Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Prof Brian Ripley
I think I have a solution I am just about to commit. It looks as if the PCRE documentation I read is wrong as to when it is safe to free the locale-specific tables, and I've deferred doing so until much later. Incidentally, I cannot make this misbehave on Windows. On Fri, 11 Jun 2004, Prof Br

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Prof Brian Ripley
So the consensus is - it happens equally in 1.9.0 and 1.9.1 alpha current - it happens in the C locale - it is random and bursty, as in > d [1] 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 [25] 84 84 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Roger D. Peng
I have the following to environmental variables set: LANGVAR=en_US.UTF-8 LANG=C I don't know exactly what both of these mean, but I always deliberately set LANG=C in my .tcshrc files since that is necessary to get Acrobat Reader working on my Red Hat system. My guess is they were both set this

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Marc Schwartz
On Fri, 2004-06-11 at 10:28, Prof Brian Ripley wrote: > This is actually PCRE. Something is wrong with your build of R-patched > (1.9.1 alpha, I assume): I get 84 everywhere. You are asking for a first > character l, then one or more characters of `word' then tmean. In your > example this is the

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Martin Maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> > on Fri, 11 Jun 2004 16:28:37 +0100 (BST) writes: BDR> This is actually PCRE. Something is wrong with your build of R-patched BDR> (1.9.1 alpha, I assume): I get 84 everywhere. You are asking for a first BDR> character l,

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Roger D. Peng
To make matters a little more interesting, I get some weird behavior on R 1.9.0 also. For example, when I run x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R";)) and then run d <- replicate(1000, length(grep("^l\\w+tmean", x, perl = TRUE, value = TRUE))) > summary(d) Min.

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Prof Brian Ripley
On Fri, 11 Jun 2004, Martin Maechler wrote: > > "Roger" == Roger D Peng <[EMAIL PROTECTED]> > > on Fri, 11 Jun 2004 10:43:57 -0400 writes: > > Roger> I've noticed a change in the way grep() behaves between the 1.9.0 > Roger> release and a recent R-patched. On 1.9.0 I get the

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Martin Maechler
I forgot to add Thank you very much for - starting to use R-patched and hence testing it - providing a nicely reproducible example Everyone else: do follow Roger! Thanks again! Martin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Prof Brian Ripley
This is actually PCRE. Something is wrong with your build of R-patched (1.9.1 alpha, I assume): I get 84 everywhere. You are asking for a first character l, then one or more characters of `word' then tmean. In your example this is the same as (in a suitable locale, including C) length(grep("^l[

Re: [Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Martin Maechler
> "Roger" == Roger D Peng <[EMAIL PROTECTED]> > on Fri, 11 Jun 2004 10:43:57 -0400 writes: Roger> I've noticed a change in the way grep() behaves between the 1.9.0 Roger> release and a recent R-patched. On 1.9.0 I get the following output: >> x <- dget(file = url("http:/

[Rd] Change in grep behavior from 1.9.0 to R-patched

2004-06-11 Thread Roger D. Peng
I've noticed a change in the way grep() behaves between the 1.9.0 release and a recent R-patched. On 1.9.0 I get the following output: > x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R";)) > length(grep("^l\\w+tmean", x, perl = TRUE, value = TRUE)) [1] 84 And on R-patched (2004