Does anybody know what is the reason for the following example:
agrepl("cold", "cool")
#> [1] FALSE
agrepl("cool", "cold")
#> [1] TRUE
[1] FALSE agrepl("cool", "cold") #> [1] TRUE" /> [1] FALSE agrepl("cool", "cold") #> [1] TRUE" /> [1] FALSE agrepl("cool", "cold") #> [1] TRUE"/>
Does anybody know what is the reason for the following example:
agrepl("cold", "cool")
#> [1] FALSE
agrepl("cool", "cold")
#> [1] TRUE
Copyright © 2021 Jogjafile Inc.
Since the
max distancedefaults to:And:
The default maximum amount of transformations for a pattern of length 4 is 1. The
cool-pattern matches thecolin the beginning of thecoldusing only 1 deletion. Changing thecoldto matchcoolwould take at least two transformations (two subsitutions or one deletion and one insertion).These examples might explain it a bit further: