R 2.15.1-1 sub() function produces unexpected output
Tue Oct 16 19:03:00 GMT 2012
On 10/12/2012 4:56 PM, Warren Young wrote:
> On 10/12/2012 9:18 AM, Toby Johnson wrote:
>> The sub() function in R 2.15.1-1 produces unexpected output. Here is
>> a minimal piece of R code:
> I believe sub() is using PCRE for this, per http://goo.gl/XxDyB
I just looked back at this and since there was no further commentary, I
decided to dig a little deeper, and saw the "perl" parameter to sub().
It turns out that it defaults to FALSE, meaning it *doesn't* use PCRE by
default. But if you set it to TRUE, Cygwin R behaves as you expect, Toby.
So, the bug must either be in the other regex library R uses by default,
or in the R-side wrapper for the call out to that library. If it were
in the mainline R code, the value of this parameter wouldn't matter.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin