Thanks a lot, everyone! collapse it is! Dimitri On Fri, Feb 25, 2011 at 5:42 PM, <seeliger.c...@epamail.epa.gov> wrote: >> s<-"start"; e<-"end" >> middle<-as.character(c(1,2,3)) >> >> I would like to get the following result: >> "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end" >> >> How can I avoide this (undesired) result: >> paste(s,middle,e,sep=" ") > > Sometimes you just have to do something more than once: > paste(s, paste(middle, collapse=','), e, sep=" ") > > cur > -- > Curt Seeliger, Data Ranger > Raytheon Information Services - Contractor to ORD > seeliger.c...@epa.gov > 541/754-4638 > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
-- Dimitri Liakhovitski Ninah Consulting www.ninah.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.