clean_contact: Dispose of Uninformative Emails and Phones

Description Usage Arguments Value

View source: R/clean_contact.R

Description

This function takes a dataframe that contains personal contacts such as emails and addresses, and cleans out uninformative contacts. For example, if a particular email address is input as fake or a default value from some particular setting, these values are replaced as NA. Similarly for phone numbers, if they are likely fake such as (999)999-9999 or contains only area numbers, they are replaced as NA.

Usage

1
2
clean_contact(df, email = NULL, email_exc = "abc@example.com",
  phone = NULL, phone_exc = "___-____")

Arguments

df

Input dataframe to be cleaned of uninformative contacts.

email

Name of the email address field. Defaults to NULL.

email_exc

Emails that are to be cleaned. Defaults to a single vector of abc at example.com

phone

Name of the phone number field. Defaults to NULL.

phone_exc

Phone numbers that are to be cleaned. Defaults to "___-____".

Value

Output dataframe with cleaned contacts.


sysilviakim/voterdiffR documentation built on June 22, 2020, 6:51 p.m.