readLines() function in R Language reads text lines from an input file. The readLines() function is perfect for text files since it reads the text line by line and creates character objects for each of the lines.
Parameter: path: path of the file
# R program to illustrate
# readLines() function
# Store currently used directory
# Write example text to currently used directory
write.table(x ="the first line\nthe second line\nthe third line",
Please Login to comment...