rcv (version 0.2.0)

characterize: Replaces number string codes in ballot with character strings from lookup

Description

Matches codes in the `contest_id`, `tally_type_id`, `precinct_id`, and `candidate_id` columns in the labelled ballot with codes from the `id` column in the labelled lookup, then replaces these codes with character values from the `description` column in the lookup.

Usage

characterize(ballot, lookup, format)

Arguments

ballot

The labelled ballot data

lookup

The labelled lookup data

format

A character string detailing the format. Current supported formats are "WinEDS" and "ChoicePlus" (forthcoming), based on common types of software used. Contact creators with suggestions for more formats.

Value

The ballot data, but now "readable" so votes can be understood

Examples

Run this code
# NOT RUN {
characterize(ballot = sf_ballot_labelled, lookup = sf_lookup_labelled,
format = "WinEDS")
# }

Run the code above in your browser using DataCamp Workspace