race_check_2_3: race_check_2_3

Description Usage Arguments Value Author(s) Examples

Description

Checks that both sides of the RxC equation for White/Minority and White, Black, Hispanic, Other, respectively, add up to the same values. If small rounding issues, adjusts the "other" race category.

Usage

1
2
3
race_check_2_3(dat, split=c(3,4), catch=FALSE, catch_col=NULL, 
                      print_sides=TRUE)
  

Arguments

dat

data.frame() object. One no vote/third party vote column, with candidate votes (for either 2 or 3 candidates), then up to four demographics with last as other

split

Numeric vector of length 2. Default is c(3,4), for two candidates and one catch-all. c(4,5) for three candidates and one catch all.

catch

Logical (TRUE/FALSE). Catch negative values. Default is FALSE

catch_col

Column names to be catched.

print_sides

Logical (TRUE/FALSE). Print out evaluations. Default is TRUE

Value

Dataset of Left side (Votes) vs. Right side (Demographics). diff column can be tagged on to exiting 'other' category to expedite data preparation process.

Author(s)

Loren Collingwood <loren.collingwood@ucr.edu>

Examples

1
2
3
  
  # EXAMPLE: NOT RUN #
  

lorenc5/eiCompare documentation built on June 5, 2019, 5:18 p.m.