Re: [R] help with paste

2011-10-27 Thread 1Rnwb
Hi Joshua, Thanks for the suggestion. Sharad -- View this message in context: http://r.789695.n4.nabble.com/help-with-paste-tp3942818p3943753.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://s

Re: [R] help with paste

2011-10-26 Thread Joshua Wiley
Hi Sharad, See ?paste, particularly the 'collapse' argument: > mols=c("LEPTIN","SAA","PTH","sEGFR") > paste(mols[1:3], collapse = " + ") [1] "LEPTIN + SAA + PTH" If this is going to ultimately end up in regression (my spidey sense is tingling), the follow up question you will have is something l

[R] help with paste

2011-10-26 Thread 1Rnwb
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") > s