ri_fmatch: ri_fmatch function

Description Usage Arguments Value Examples

Description

ver: 0.1.0

Author: Dien Giau Bui (aka Richard)

This function fuzzy-match 2 vector of strings and return the output vector. In this version, I allow only one key.

We need two objects and the method to match:

1. name_old: is the string vector of name (that we need to match)

2. key: a data.frame with at least two variables: name and key (e.g, gvkey or cusip)

3. Method: default is "dl". Other methods: "osa", "lv", "dl", "hamming", "lcs", "qgram", "cosine", "jaccard", "jw", "soundex". Detail: ?stringdist::stringdist

Usage

1
ri_fmatch(name_old, key, method_type = "dl")

Arguments

name_old

a vector

key

a data.frame

Value

the matching between (name_old) and (key)

Examples

1
2
3
4
5
data("key")

old <- name_old$name_old

match <- ri_fmatch(old, key)

diengiau/rifin documentation built on May 6, 2019, 6:01 p.m.