how to write to a simple text file in 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.csv(my_data, file = "my_data.csv")
write.csv2(my_data, file = "my_data.csv")