[R] Stringr Package

Hadley Wickham h.wickham at gmail.com
Wed Apr 10 21:52:09 CEST 2013


> with(dat, data.frame(X=rep(X, each=2), Y=unlist(strsplit(Y, split=" - "))))

str_split_fixed would be a bit safer here.

Hadley

--
Chief Scientist, RStudio
http://had.co.nz/



More information about the R-help mailing list