View source: R/ei_preprocessing.R
check_diffs | R Documentation |
This function checks conditions inputted to clean_race by the user
check_diffs(vote_sums, provided_totals, max_dev = 0.1, avg_dev = 0.25)
vote_sums |
A numeric vector containing the sums of votes by each race/ethnicity |
provided_totals |
A numeric vector containing the totals provided to the clean_race function |
max_dev |
A floating point object passed from clean_race |
avg_dev |
A floating point object passed from clean_race |
When this function returns 0, votes do not sum close enough to the provided vote totals.
When this function returns 1, votes sum marginally away from the provided totals. Restandardization is appropriate
When this function returns 2, votes sum exactly to vote totals
A list containing two objects, 'closeness' and 'deviates'. See details for more information.
Ari Decter-Frain
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.