Description Usage Arguments Details Value
View source: R/clean_functions.R
Find the best match for one character string in a vector of character strings using Levenshtein distance.
1 | bestmatch(string, stringVector)
|
string |
elements to be approximately matched: will be coerced to
|
stringVector |
a vector of strings to be used as lookup table for
matching. Will be coerced to |
The function bestmatch
is a quick wrapper around the stringdist::amatch()
function using method = "lv"
and maxDist = 1
a vector of the same length as string
containing the position
of the closest match of each element of string
in stringVector
.
Identical to the result returned by stringdist::amatch()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.