[R] String manipulation
Lefebure Tristan
Tristan.Lefebure at univ-lyon1.fr
Fri Jun 25 11:32:41 CEST 2004
Hi
look at ?paste
> paste("one","two","three",sep=",")
[1] "one,two,three"
On Friday 25 June 2004 11:07, Robin Gruna wrote:
> Hi,
> let's see, if someone can help my with this one:
>
> I have the string as follows:
> > str<-("one","two","three")
>
> Now I want to concatenate the items to one string, seperateted by space or
> something else,
>
> >str
> >"one, two, three"
>
> If possible without a loop.
>
> My actual goal ist to create string like
>
> >str.names
> >"female = names1, male = names2"
>
> and pass it as argument to list(), intending to create a list
>
> >names.list<-list( female = names1, male = names2)
>
> Thanks a lot,
> Robin
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.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