ri_fmatch
is the function to fuzzy-match two string vectors and returns the output with: name_old, name_matched, and key.
In this version, I allow only one key (i.e., gkvey or cusip) in the key
file. I will update later.
We need two objects:
- name_old
: is a string vector of name that we need to match
- key
: a data.frame with 2 variables: name and key
The output will be a tibble with 3 variables: name_old, name_matched (from key
file), and key.
stringdist
package, default method is dl
.parLapply
to improve the performance. It reduces a lot of time to run. For example, if I use lapply
, it takes hours to finish (e.g., a football match). Thanks to this parallel, we can save time (e.g., a Chopin piece only). You should install these dependent packages:
- tidyverse
- stringdist
- parallel
Update later. Sorry.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.