Given a character vector, calculate the distance for each element
to the nearest neighbor amongst all the other elements.
Arguments
- x
A character vector.
- metric
A character scalar defining the string distance metric. One
of "hamming"
(default), "hamming_shift"
or
"levenshtein"
.
- nThreads
numeric(1), number of threads to use for parallel processing.
Value
An integer vector of the same length as x
.