I have a vector of locations that I am trying to disambiguate against a vector of correct location names. For this example I am using just two disambiguated locations tho:
agrepl('Au', c("Austin, TX", "Houston, TX"),
max.distance = .000000001,
ignore.case = T, fixed = T)
[1] TRUE TRUE
The help page says that max.distance
is
Maximum distance allowed for a match. Expressed either as integer, or as a fraction of the pattern length times the maximal transformation cost
I am not sure about the mathematical meaning of the Levensthein distance; my understanding is that smaller the distance, the stricter the tolerance for mismatches with my vector of disambiguated strings.
So I would I adjust it to retrieve two FALSE
? Basically I would like to have a TRUE
only when there is a difference of 1 character like in:
agrepl('Austn, TX', "Austin, TX",
max.distance = .000000001, ignore.case = T, fixed = T)
[1] TRUE