Learn R Programming

eiCompare (version 3.0.4)

get_multi_barreled_surnames: Gets multi-barreled surnames from a voter file.

Description

A multi-barreled surname is one containing a dash or a space. This function finds all multi-barreled surnames in a voter file.

Usage

get_multi_barreled_surnames(
  voter_file,
  surname_col = "last_name",
  regex = "[ -]+"
)

Value

A dataframe of voters whose surnames are multi-barreled.

Arguments

voter_file

The voter file, with each row consisting of a voter.

surname_col

A string denoting the surname column.

regex

A string denoting the regular expression to use for denoting the the special characters.