[R] applying strsplit to a whole column

Dimitri Liakhovitski dimitri.liakhovitski at gmail.com
Wed Aug 4 19:42:39 CEST 2010


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



More information about the R-help mailing list