[R] Concatenate vector into string

Chuck Cleland ccleland at optonline.net
Fri Mar 4 13:38:20 CET 2005


Matthieu Cornec wrote:
> Hello,
> 
> I would like to convert c("a","b","c") into "abc".
> Anyone could help?

?paste

paste(c("a","b","c"), collapse="")

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list