StringComparator-class | R Documentation |
Represents a comparator for pairs of strings.
.Data
a function that calls the elementwise method for this class,
with arguments x
, y
and ...
.
symmetric
a logical of length 1. If TRUE, the comparator is symmetric
in its arguments—i.e. comparator(x, y)
is identical to
comparator(y, x)
.
distance
a logical of length 1. If TRUE
, the comparator produces
distances and satisfies comparator(x, x) = 0
. The comparator may not
satisfy all of the properties of a distance metric.
similarity
a logical of length 1. If TRUE
, the comparator produces
similarity scores.
tri_inequal
a logical of length 1. If TRUE
, the comparator satisfies
the triangle inequality. This is only possible (but not guaranteed) if
distance = TRUE
and symmetric = TRUE
.
ignore_case
a logical of length 1. If TRUE, case is ignored when comparing strings. Defaults to FALSE.
use_bytes
a logical of length 1. If TRUE, strings are compared byte-by-byte rather than character-by-character.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.