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