[R] How to merge two strings

Sean Davis sdavis2 at mail.nih.gov
Tue Aug 16 13:07:15 CEST 2005


On 8/16/05 7:01 AM, "Claus Hindsgaul" <claush at mek.dtu.dk> wrote:

> Hi r-help,
> 
> A very simple question for which I have not been able to find an answer
> in the docs:
> 
> How can I merge two character strings?
> 
> I am searching for the equivalent of the (non-existing) stringmerge
> function illustrated below:
> 
>> s1 <- "R-"
>> s2 <- "project"
>> stringmerge(s1,s2)
> [1] "R-project"

See ?paste.

Sean




More information about the R-help mailing list