Have a look at the
stringr
package

It simplifies such things...

----------------Contact
Details:-------------------------------------------------------
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Wed, Aug 4, 2010 at 8:42 PM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:

> I am sorry, I'd like to split my column ("names") such that all the
> beginning of a string ("X..") is gone and only the rest of the text is
> left.
>
> x<-data.frame(names=c("X..aba","X..abb","X..abc","X..abd"))
> x$names<-as.character(x$names)
> (x)
> str(x)
>
> Can't figure out how to apply strsplit in this situation - without
> using a loop. I hope it's possible to do it without a loop - is it?
>
> Thanks a lot!
>
>
> --
> 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.
>

        [[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.

Reply via email to