A user wants to write some texts and wants an output as a text file in R.How to do that?

306    Asked by Tanujatrivedi in Data Science , Asked on Dec 13, 2019
Answered by Tanuja trivedi

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”



Your Answer

Interviews

Parent Categories