Learn R Programming

messy.cats (version 1.0)

select_metric: select_metric

Description

Uses heuristic algorithm to suggest a stringdist metric from among hamming, lv, osa, dl, lcs, jw

Usage

select_metric(messy_v, clean_v)

Value

a string representing the suggested stringdist metric

Arguments

messy_v

a messy vector of strings

clean_v

a vector of strings for messy_v to be matched against

Details

for each metric, measures certainty via the difference between the best matches for each word and the average of all matches for each word

See Also

stringdist

Examples

Run this code
select_metric(c("aapple", "bamana", "clemtidne"), c("apple", "banana", "clementine"))

Run the code above in your browser using DataLab