Description Usage Arguments Examples
View source: R/searchr_match_combinations.R
Matches any combination of letters from A against any combination of letters in B within specified tolerances. Function is case-sensitive.
1 2 3 4 5 6 | schr_match_combinations(
match_this,
against_these,
a_not_in_b_tolerance = 1,
b_not_in_a_tolerance = 1
)
|
match_this |
tabled characters; primary input with single row of a table created by /codetable_characters() |
against_these |
tabled characters; various possible names to match the first argument against, characters also must be tabled through /codetable_characters() |
a_not_in_b_tolerance |
number of non-required characters from your /codematch_this input to find in matches, i.e. how many characters from A are not required to be in B e.g. "tori" has no characters that "tory girl" does not also have; any tolerance setting would match these; however, "tori" has one character that "tory" does not have, so matching these would require at least a tolerance of 1. Combinatorially, "tori" is a perfect match with "tior", "riot", etc, which means an /codea_not_in_b_tolerance of zero would find these matches |
b_not_in_a_tolerance |
number of additional-non-matching characters (like wildcards) to allow in B that are not in A, e.g. "tori" differs from "torii" by b_not_in_a_tolerance of 1, and from "victoria" by b_not_in_a_tolerance of 4. Matching those names therefore requires at least those values. |
1 2 3 | a_tbl <- schr_tbl_chars("eau leaf")
b_tbl <- schr_tbl_chars(c("eauleaf", "leafy", "eu leaf", "fael eau"))
schr_match_combinations(match_this = a_tbl, against_these = b_tbl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.