On Nov 20, 2009, at 8:03 PM, Peng Yu wrote:

paste(c('a','b'),sep='')
[1] "a" "b"

The above command doesn't concatenate the strings in a single string.
I'm wondering what is the correct way to do so.

Remember that paste is vectorised. That behavior is desired:

> paste('a','b',sep='')
[1] "ab"
> paste(c('a','b'), c(1,2), sep='')
[1] "a1" "b2"




David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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