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
Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk > Sent: Thursday, May 28, 2009 5:30 AM > Cc: R help project; r-devel@r-project.org; A

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

Re: [Rd] as.numeric(levels(factor(x))) may be a decreasing sequence

2009-05-28 Thread Petr Savicky
On Wed, May 27, 2009 at 10:51:38PM +0200, Martin Maechler wrote: > I have very slightly modified the changes (to get rid of -Wall > warnings) and also exported the function as Rf_dropTrailing0(), > and tested the result with 'make check-all' . Thank you very much for considering the patch. -Wall

Re: [Rd] internal and external debugging [was: [R] step by step debugger in R?]

2009-05-28 Thread Romain Francois
Hi, Thank you for these comments. I think it does indeed add to the discussion and provides a good reference. I have added a few comments below. mark.braving...@csiro.au wrote: Hello all I'm coming late to this discussion, and my comments may now be beside the point-- but I have been inten

Re: [Rd] Bug in "$<-.data.frame" yields corrupt data frame (PR#13724)

2009-05-28 Thread Prof Brian Ripley
Would the above modification work to fix this problem? Yes thank you, and I've incorporated it in R-patched and R-devel. It does catch 3 packages, DescribeDisplay, rgcvpack and BioC:rHVDM. On Wed, 27 May 2009, smckin...@bccrc.ca wrote: Full_Name: Steven McKinney Version: 2.9.0 OS: Mac OS X 1