prepformatch: Prep a data frame for matching.

Description Usage Arguments Value

View source: R/matchfunctions.R

Description

Preps a data frame for matching by just grabbing the necessary columns. Currently does not handle missing columns/no matches very well. Needs to be improved.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
prepformatch(
  x,
  pidm = c("pidm", "banner ID", "bannerID"),
  firstname = c("firstname", "first name", "^first$"),
  lastname = c("lastname", "last name", "^last$"),
  addr = c("address line 1", "address", "addr", "address1", "address 1", "addr1"),
  city = c("city", "town", "hometown"),
  st = c("state/province", "state", "^st$"),
  zip = c("zip code", "zipcode", "zip"),
  email = c("preferred email", "preferred e-mail", "pref email", "pref e-mail",
    "e-mail", "email")
)

Arguments

x

a data frame to be prepared

pidm

a vector of regular expressions to try to match for pidm location

firstname

a vector of regular expressions to try to match for firstname location

lastname

a vector of regular expressions to try to match for lastname location

addr

a vector of regular expressions to try to match for address location

city

a vector of regular expressions to try to match for city location

st

a vector of regular expressions to try to match for state location

zip

a vector of regular expressions to try to match for zip code location

email

a vector of regular expressions to try to match for email location

Value

a data frame with nrows(x) with the columns matched by the regular expressions.


crazybilly/muadc documentation built on March 6, 2021, 4:15 p.m.