Best Answer · By JanBask Data Science Expert
Answered on Dec 13, 2019
For writing some text to a file,let us write some words into a file
orig_file<-file("output.txt")
writeLines(c("Hello",”John"), orig_file)
close(orig_file)
Here output.txt is the output file which will contain strings such as “Hello” and ”John”