I have an arbitrary number of columns containing text data that have been assembled using the cbind() command, for example:
[1,] \"Text 1,1\" \"Text 1,2\" \"Te
Just use paste with its collapse argument:
paste
collapse
R> row <- c("Text 1,1", "Text 1,2", "Text 1,n") R> paste(row, collapse=" ") [1] "Text 1,1 Text 1,2 Text 1,n" R>
paste is vectorised, so you can feed it multiple arguments at once.