So I've run into a small bug/feature in R where the agrep function does not accept the "|" character as valid regular expression logic (others have had this problem too), when used in the argument.
I'm trying to do a fuzzy match of 30 different, relatively unique names in one character vector (ListofUniqueNames) against a list of over 380,000 different names in a data-frame column (MasterList$Names), and get an output of all the matching names. I was able to accomplish this fine for exact matches using grep via
grep(paste(ListofUniqueNames,collapse="|"),MasterList$Names, value=TRUE, ignore.case = TRUE)
However, this approach doesn't work for agrep due to the problem listed above. How can I accomplish this same task but with fuzzy matching?