Hello,
I would like to convert c("a","b","c") into "abc".
Anyone could help?
Thanks,
Matthieu Cornec
Concatenate vector into string
8 messages · Matthieu Cornec, Chuck Cleland, Uwe Ligges +5 more
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
Matthieu Cornec wrote:
Hello,
I would like to convert c("a","b","c") into "abc".
Anyone could help?
See ?paste Uwe Ligges
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
Use the collapse argument in paste.
paste( c("a", "b", "c"), collapse="" )
[1] "abc"
On Fri, 2005-03-04 at 03:32 -0800, Matthieu Cornec wrote:
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
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050304/993d4c07/attachment.pl
Matthieu Cornec wrote:
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
paste( c("a","b","c"),collapse="")
Eryk
Witold Eryk Wolski
__("< School of Mathematics and Statistics _
\__/ University of Newcastle 'v'
|| Newcastle upon Tyne, NE1 7RU, ENGLAND / \
^^ mail: witek96 at users.sourceforge.net m m
Phone : 044 (0)191 222 5376
FAX : 044 (0)191 222 8020
How about:
> paste( c("a","b","c"), collapse="")
[1] "abc"
>
hope this helps.
spencer graves
Matthieu Cornec wrote:
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
On 4 Mar 2005, at 11:32 am, Matthieu Cornec wrote:
Hello,
I would like to convert c("a","b","c") into "abc".
Anyone could help?
paste(c("a", "b", "c"), sep="")
Tim
Dr Tim Cutts Informatics Systems Group, Wellcome Trust Sanger Institute GPG: 1024D/E3134233 FE3D 6C73 BBD6 726A A3F5 860B 3CDD 3F56 E313 4233