Ok, so I posted a question a while back concerning writing an R function to accelerate string matching of large text files. I had my eyes opened to \'data.table\' and my que
I finally got it.
The agrep-function has a value-option that needs to be altered from FALSE (default) to TRUE:
dt <- dt[lapply(car.vins, agrep, x = vin.vins, max.distance = c(cost=2, all=2), value = TRUE)
, .(NumTimesFound = .N)
, by = vin.names]
Note: the max.distance parameters can be altered based on Levenshtein distance, substitutions, deletions, etc. 'agrep' is a fascinating function!
Thanks again for all the help!