[R] Combining characters

jeremy jeremynamerica at gmail.com
Wed Jan 4 17:32:24 CET 2012


Hi all,

I'm trying to combine exhaustively several character arrays in R like:
x=c("one","two","three")
y=c("yellow","blue","green")
z=c("apple","cheese")

in order to get concatenation of 

x[1] y[1] z[1]  ("one yellow apple")
x[1] y[1] z[2] ("one yellow cheese")
x[1] y[2] z[1]("one blue apple")
...
x[length(x)] y[length(y)] z[length(z)]  ("three green cheese")

Anyone has a solution ?
Thank in advance

--
View this message in context: http://r.789695.n4.nabble.com/Combining-characters-tp4261888p4261888.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list