Message-ID: <1319677416857-3942818.post@n4.nabble.com>
Date: 2011-10-27T01:03:36Z
From: 1Rnwb
Subject: help with paste
Hello gurus,
I have some variables, and i am creating combinations for analysis in the
end i need these variables to be displayed like "LEPTIN+SAA+PTH". currently
i am using loop to perform this. I would appreciate any pointers to do it
without the loop.
> mols=c("LEPTIN","SAA","PTH","sEGFR")
> samples=mols[1:3]
> samples
[1] "LEPTIN" "SAA" "PTH"
> names1=samples[1]
> for (j in 2:length(samples)){ names1 = paste (names1, samples[j],
> sep="+")}
> names1
[1] "LEPTIN+SAA+PTH"
>
thanks
sharad
--
View this message in context: http://r.789695.n4.nabble.com/help-with-paste-tp3942818p3942818.html
Sent from the R help mailing list archive at Nabble.com.