Description Usage Arguments Value Examples
Uses Levenshtein distance to compare similaririty between strings and will always return a value, even if the similarity score is very low.
1 | closest_matches(value, values, margin = 0, ...)
|
value |
A character of length one. The target value used to find the most
similar strings in |
values |
A character. The values to selected the most similar to |
margin |
A numeric, the amount to expand the results by. The default, 0,
will return only the lowest similiarity score. Increasing |
... |
Arguments passed through to |
A character vector with the subset of values
equal to or less than
similarity_score + margin
.
1 2 | values <- c("dog", "cat", "bird")
closest_matches("cats", values)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.