Description Usage Arguments Value References

View source: R/levenshtein.R View source: R/Levenshtein.R

Measure the Levenshtein edit distance between strings

1 2 3 4 5 6 7 |

`string1, string2` |
character strings to measure edit distance between |

`stringVector` |
character vector to measure all pairwise edit distances of |

`case` |
be case sensitive |

`damerau` |
Demerau enhancement, swap of adjacent letters costs 1 instead of 2 |

`map` |
character vector of regular expression modifiers |

`motif` |
when true, a single letter replacement costs 2, as a 'remove then insert' |

`diagonalValue` |
a numeric value to be assigned for a string's distance to itself |

`verbose` |
when true, print a small message to show progress to std out |

For `levenshtein`

, a numeric scalar that is the number of character edits
needed to turn `string1`

into `string2`

.

For `levenshteinDistanceMatrix`

, a square symmetric numeric matrix of size
` N = length(stringVector)`

, where each element is the number of character edits
between the corresponding 2 strings of `stringVector`

, with explicit diagonal
elements set to value `diagonalValue`

.

For `levenshtein`

, a numeric scalar that is the number of character edits
needed to turn `string1`

into `string2`

. This is a faster re-write in C.

Written by: Hans-Joerg Bibiko [email protected]

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.