calcNearestStringDist | R Documentation |
Given a character vector, calculate the distance for each element to the nearest neighbor amongst all the other elements.
calcNearestStringDist(x, metric = "hamming", nThreads = 1L)
x |
A character vector. |
metric |
A character scalar defining the string distance metric. One
of |
nThreads |
numeric(1), number of threads to use for parallel processing. |
An integer vector of the same length as x
.
calcNearestStringDist(c("lazy", "hazy", "crazy"))
calcNearestStringDist(c("lazy", "hazy", "crazy"), metric = "hamming_shift")
calcNearestStringDist(c("lazy", "hazy", "crazy"), metric = "levenshtein")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.