[R] regexpr with accents
Luca Meyer
lucam1968 at gmail.com
Mon Aug 6 07:55:50 CEST 2012
Hello,
I have build a syntax to find out if a given substring is included in a larger string that works like this:
d1$V1[regexpr("some text = 9",d1$V2)>0] <- 9
and this works all right till "some text" contains standard ASCII set. However, it does not work when accents are included as the following:
d1$V1[regexpr("some tèxt = 9",d1$V2)>0] <- 9
I have tried to substitute "è" with several wildcards but it did not work, can anyone suggest how to have the syntax parse the string ignoring the accent?
Thank you in advance,
Luca
More information about the R-help
mailing list