eiCompare (version 3.0.0)

race_check_2_3: race_check_2_3

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

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.

Examples

Run this code
# NOT RUN {
  
  # EXAMPLE: NOT RUN #
  

# }

Run the code above in your browser using DataLab