Is there a built-in way to quantify results of agrep
function? E.g. in
agrep("test", c("tesr", "teqr", "toar"), max = 2, v=T)
[1] "tesr" "teqr"
tesr
is only 1 char permutation away from test
, while teqr
is 2, and toar
is 3 and hence not found. Apparently, tesr
has higher "probability" than teqr
. How can it be retrieved either in number of permutations or percentage?
Thanks!
Edit: Apologies for not putting this in question in first place. I am already running a two-step procedure: agrep
to get my list, and then adist
to get N permutations. adist
is slower, running time is a big factor in my dataset