R/levenshtein.neighbors.R

Defines functions levenshtein.neighbors

Documented in levenshtein.neighbors

levenshtein.neighbors <-
function(xsource, targets){
    results<-list()
    distances<-levenshtein.distance(xsource, targets)
    for (distance in min(distances):max(distances)){
        results[distance]=list(names(which(distances==distance)))
    }
    return(results)
}

Try the vwr package in your browser

Any scripts or data that you put into this service are public.

vwr documentation built on May 2, 2019, 4:23 a.m.