On Sat, Jun 14, 2008 at 12:55 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try this: > >> library(gsubfn) >> x <- "A: 123 B: 456 C: 678" >> strapply(x, "[^ :]+[ :]|[^ :]+$") > [[1]] > [1] "A:" "123 " "B:" "456 " "C:" "678" > > and check out the gsubfn home page at: > > http://gsubfn.googlecode.com
Thanks Gabor! Hadley -- http://had.co.nz/ ______________________________________________ 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.