Dimitri Shvorob wrote:
... Both readLines() and scan() produce a number_of_lines x 1 vector; trying
paste(s, collapse = NULL) leaves it unaffected. How can I concatenate vector
elements (lines) into a single string? Thank you.

Read ?paste, specifically:

     If a value is specified for ‘collapse’, the values in the result
     are then concatenated into a single string, with the elements
     being separated by the value of ‘collapse’.


You need to specify, say,  collapse = " ".

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to