[R] Joining Characters in R {issue with paste}

Michael Dewey info at aghmed.fsnet.co.uk
Thu Sep 10 12:23:51 CEST 2009


At 22:13 09/09/2009, Abhishek Pratap wrote:
>I did try ?paste and paste(a,b,separator=""). same result

Your second example pastes three strings together. "a" "b" and " ", 
the third of which you have named separator which is not the same as sep.

>Thanks,
>-Abhi
>
>On Wed, Sep 9, 2009 at 5:11 PM, milton ruser <milton.ruser at gmail.com> wrote:
>
> > You not tryed ?paste  :-)
> >
> > paste(a,b,sep="")
> >
> > bests
> >
> > milton
> >
> > On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap 
> <abhishek.vit at 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 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<http://www.r-project.org/posting-guide.html>
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >
> >
>
>         [[alternative HTML version deleted]]

Michael Dewey
http://www.aghmed.fsnet.co.uk




More information about the R-help mailing list