Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Apostrophes and optional argument (?) in grep vs agrep

$
0
0

When I run the below 4 lines of code I dont get the same result from all 4. Why is the last line not finding a match?

grep("CPA's", c("CPA's"))
agrep("CPA's", c("CPA's"))

grep("CPA'?s?", c("CPA's"))
agrep("CPA'?s?", c("CPA's"))

I haven't yet done my full reading on the fuzzy matching functions, but on the face of it I don't see why this would be an issue.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>