standardize_votes: Computes proportions for returning by clean_race and...

View source: R/ei_preprocessing.R

standardize_votesR Documentation

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

Author(s)

Ari Decter-Frain


eiCompare documentation built on Aug. 31, 2023, 5:16 p.m.