Hi Guys I am want to join to strings in R. I am using paste but not getting desirable result. For the sake of clarity, a quick example:> a="Bio" > b="iology" > paste(a,b)[1] "Bio iology" *There is a SPACE in the word biology which is what I dont want * Thanks, -Abhi [[alternative HTML version deleted]]
You not tryed ?paste :-) paste(a,b,sep="") bests milton On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap <abhishek.vit@gmail.com>wrote:> Hi Guys > I am want to join to strings in R. I am using paste but not getting > desirable result. > > For the sake of clarity, a quick example: > > > a="Bio" > > b="iology" > > paste(a,b) > [1] "Bio iology" > > > *There is a SPACE in the word biology which is what I dont want * > > > Thanks, > -Abhi > > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
And did you read the help file, ?paste , paying attention to the arguments and their descriptions, specifically the "sep" argument? Presumably, you want, paste(a, b, sep = "") -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Abhishek Pratap Sent: Wednesday, September 09, 2009 4:09 PM To: r-help at r-project.org Subject: [R] Joining Characters in R {issue with paste} Hi Guys I am want to join to strings in R. I am using paste but not getting desirable result. For the sake of clarity, a quick example:> a="Bio" > b="iology" > paste(a,b)[1] "Bio iology" *There is a SPACE in the word biology which is what I dont want * Thanks, -Abhi [[alternative HTML version deleted]] ______________________________________________ R-help at 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.
?paste and look at sep. On Wed, 9 Sep 2009, Abhishek Pratap wrote:> Hi Guys > I am want to join to strings in R. I am using paste but not getting > desirable result. > > For the sake of clarity, a quick example: > >> a="Bio" >> b="iology" >> paste(a,b) > [1] "Bio iology" > > > *There is a SPACE in the word biology which is what I dont want * > > > Thanks, > -Abhi > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Clint Bowman INTERNET: clint at ecy.wa.gov Air Quality Modeler INTERNET: clint at math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600 FAX: (360) 407-7534 Olympia, WA 98504-7600
On 10/09/2009, at 9:08 AM, Abhishek Pratap wrote:> Hi Guys > I am want to join to strings in R. I am using paste but not getting > desirable result. > > For the sake of clarity, a quick example: > >> a="Bio" >> b="iology" >> paste(a,b) > [1] "Bio iology" > > > *There is a SPACE in the word biology which is what I dont want *(1) RTFM (2) paste(a,b,sep="") cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}