Learn R Programming

eiCompare (version 3.0.4)

tidy_voter_file_wru: Tidies a voter file for WRU.

Description

Checks if columns exist in the original voter file and renames them so that WRU can process the new voter file. Only extract the information needed, tossing the remaining columns.

Usage

tidy_voter_file_wru(
  voter_file,
  voter_id = NULL,
  surname = NULL,
  state = NULL,
  county = NULL,
  tract = NULL,
  block = NULL
)

Value

A new voter file that can be read in by WRU functions.

Arguments

voter_file

The voter file, as a data frame or tibble.

voter_id

A string denoting the column containing voter ID. Default is NULL, when the voter file does not have an ID or registration number.

surname

A string denoting the column containing the surname.

state

A string denoting the column containing the state FIPS code.

county

A string denoting the column containing the county FIPS code.

tract

A string denoting the column containing the tract FIPS code.

block

A string denoting the column containing the block FIPS code.