eiCompare (version 3.0.0)

standardize_votes: Computes proportions for returning by clean_race and clean_cand

Description

Computes proportions for returning by clean_race and clean_cand

Usage

standardize_votes(votes, new_names = FALSE)

Arguments

votes

A dataframe of raw votes by race or candidates

new_names

A boolean indicating whether to return cand and race columns with the same names. If FALSE, names returned with "_prop" added on.

Value

A dataframe of standardized proportions whose columns sum rowwise to 1