[R] Concatenate vector into string

Liaw, Andy andy_liaw at merck.com
Fri Mar 4 14:31:53 CET 2005


See ?paste, e.g.,

> char <- c("a", "b", "c")
> paste(char, collapse="")
[1] "abc"

Andy

> From: Matthieu Cornec
> 
> Hello,
> 
> I would like to convert c("a","b","c") into "abc".
> Anyone could help?
> Thanks,
> 
> Matthieu Cornec
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list