internal-functions: Internal functions

internal-functionsR Documentation

Internal functions

Description

lev_partial_ratio() and lev_token_set_ratio() are hard to vectorise in one go, so in the interests of lazy thinking these "internal" versions contain the logic to operate on single-length inputs, and the calling functions just apply() them as needed.

Usage

internal_lev_token_set_ratio(a, b, pairwise = TRUE, useNames = !pairwise, ...)

internal_lev_partial_ratio(a, b, pairwise = TRUE, useNames = !pairwise, ...)

Arguments

a, b

The input strings. For these "internal" functions these must be length 1

pairwise

Boolean. If TRUE, only the pairwise distances between a and b will be computed, rather than the combinations of all elements.

useNames

Boolean. Use input vectors as row and column names?

...

Additional arguments to be passed to stringdist::stringdistmatrix() or stringdist::stringsimmatrix().

Functions

  • internal_lev_token_set_ratio(): See lev_token_set_ratio().

  • internal_lev_partial_ratio(): See lev_partial_ratio().


levitate documentation built on Oct. 1, 2023, 1:08 a.m.