Re: [Rd] [R] split strings

2009-05-28 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > William Dunlap wrote: > >> Would your patched code affect the following >> use of regexpr's output as input to substr, to >> pull out the matched text from the string? >>> x<-c("ooo","good food","bad") >>> r<-regexpr("o+", x) >>> substring(x,r,attr(r,"match

Re: [Rd] [R] split strings

2009-05-28 Thread Wacek Kusnierczyk
William Dunlap wrote: > > Would your patched code affect the following > use of regexpr's output as input to substr, to > pull out the matched text from the string? >> x<-c("ooo","good food","bad") >> r<-regexpr("o+", x) >> substring(x,r,attr(r,"match.length")+r-1) >[1] "ooo" "oo"

Re: [Rd] [R] split strings

2009-05-28 Thread William Dunlap
l@r-project.org; Allan Engelhardt > Subject: Re: [Rd] [R] split strings > > (diverted to r-devel, a source code patch attached) > > Wacek Kusnierczyk wrote: > > Allan Engelhardt wrote: > > > >> Immaterial, yes, but it is always good to test :) and your solutio

Re: [Rd] [R] split strings

2009-05-28 Thread Wacek Kusnierczyk
(diverted to r-devel, a source code patch attached) Wacek Kusnierczyk wrote: > Allan Engelhardt wrote: > >> Immaterial, yes, but it is always good to test :) and your solution >> *is* faster and it is even faster if you can assume byte strings: >> > > :) > > indeed; though if the speed is