View source: R/wcvp_match_fuzzy.R
wcvp_match_fuzzy | R Documentation |
Fuzzy matching to names in the WCVP using phonetic matching and edit distance. The WCVP can be loaded for matching from rWCVPdata::wcvp_names.
wcvp_match_fuzzy(names_df, wcvp_names, name_col, progress_bar = TRUE) phonetic_match(names_df, wcvp_names, name_col) edit_match(names_df, wcvp_names, name_col)
names_df |
Data frame of names for matching. |
wcvp_names |
Data frame of taxonomic names from WCVP version 7 or later.
If |
name_col |
Character. The column in |
progress_bar |
Logical. Show progress bar when matching? Defaults to
|
The wcvp_match_fuzzy
function uses phonetic matching first and then finds
the closest match based on edit distance for any remaining names.
Phonetic matching uses phonics::metaphone encoding with a maximum code length of 20.
Edit distance matching finds the closest match based on Levenshtein similarity, calculated by RecordLinkage::levenshteinSim.
Match results from WCVP bound to the original data from names_df
.
Other name matching functions:
wcvp_match_exact()
,
wcvp_match_names()
# this example requires 'rWCVPdata' if(requireNamespace("rWCVPdata")){ wcvp_names <- rWCVPdata::wcvp_names wcvp_match_fuzzy(redlist_example, wcvp_names, "scientificName") } # this example requires 'rWCVPdata' if(requireNamespace("rWCVPdata")){ wcvp_names <- rWCVPdata::wcvp_names phonetic_match(redlist_example, wcvp_names, "scientificName") } # this example requires 'rWCVPdata' if(requireNamespace("rWCVPdata")){ wcvp_names <- rWCVPdata::wcvp_names edit_match(redlist_example, wcvp_names, "scientificName") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.