Possible Duplicate:
Import text file as single character string
Is there a way to read a text file directly into a single string in R?
I am currently using readLines to split the file into lines and and then paste to collapse it into a string
profiletext <- paste(readLines("/etc/profile"), collapse="\n")
Is it possible to do this in one step?
(In python I would use the read
function)