This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: R 2.15.1-1 sub() function produces unexpected output


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
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]