Hi folks,
Can anyone enlighten me as to why I get the following when I search for
".csv" at the end of a string?
> grep("\.csv$","Blah.csv",value=TRUE)
[1] "Blah.csv"
Warning messages:
1: '\.' is an unrecognized escape in a character string
2: unrecognized escape removed from "[\.]csv$"
R re
Hi folks,
Can anyone suggest an efficient way to do "matching without
replacement", or "one-to-one matching"? pmatch() doesn't quite provide
what I need...
For example,
lookupTable <- c("a","b","c","d","e","f")
matchSample <- c("a","a","b","d")
##Normal match() behaviour:
match(matchSample,lo
My thanks to Gabor Grothendieck, Charles C. Berry and Moshe Olshansky
for their suggested solutions.
The upshot of which is that a nice one-line solution to my one-to-one
exact matching problem is the Grothendieck-Berry collaboration of
match(make.unique(matchSample), make.unique(lookupTable))
3 matches
Mail list logo