I am sure there is something I am just not understanding about agrep
functionality.
str1 <- c("ab","aba","abc")
agrep("abc",str1, max.distance = list(insertions=0, substitutions=0,
deletions=1), value=T)
returns:
[1] "ab" "aba" "abc"
Why is "aba" a match? It seems to me that this should require a
substitution and this has been set to 0 in max.distance. Alternatively
this would require a deletion plus an insertion but, again, not
permitted in arguments.
Thanks for your help,
Paul Galpern
PhD Candidate
Natural Resources Institute
University of Manitoba
Winnipeg, Manitoba, Canada
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.