FAQ
why 3 parameters on the 'grepl'? Did you mean to say:


?grepl("\\W", "?") # FALSE




Jim Holtman
Data Munger Guru


What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.


On Tue, Feb 9, 2016 at 11:55 AM, Ista Zahn wrote:

I just spent a day and a half debugging someone's code, only to
discover that the problem is platform dependent regular expressions.
For example:

## Windows:
grepl("\\W", "", "?") # TRUE

## OS X:
grepl("\\W", "", "?") # TRUE

## Linux:
grepl("\\W", "", "?") # FALSE

Ouch. The documentation does say "Certain named classes of characters
are predefined. Their interpretation depends on the _locale_", but
that doesn't seem to cover it given that the locale on OS X and Linux
was the same (en_US.UTF-8).

Question: Is this considered a bug, and if so what can I do to help
fix it? I've checked and the issue is present in both r-patched and
r-devel.

Best,
Ista

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

  [[alternative HTML version deleted]]

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupr-help @
categoriesr
postedFeb 9, '16 at 4:55p
activeFeb 9, '16 at 5:39p
posts3
users2
websiter-project.org
irc#r

2 users in discussion

Ista Zahn: 2 posts Jim holtman: 1 post

People

Translate

site design / logo © 2018 Grokbase