convert dataframe to txt R code example
Example 1: r write to txt
fileConn<-file("output.txt")
writeLines(c("Hello","World"), fileConn)
close(fileConn)
Example 2: write text r
write.table(x, file, append = FALSE, sep = " ", dec = ".",
row.names = TRUE, col.names = TRUE)