# \donttest{
#library(eiExpand)
#data("south_carolina")
#prec_election_demog <- south_carolina[1:50,]
## run rpv using eiCompare (rxc method)
#rxcVote <- eiCompare::ei_rxc(
# data = prec_election_demog,
# cand_cols = c('pct_mcmaster', 'pct_smith', 'pct_other_gov', 'pct_NoVote_gov'),
# race_cols = c('pct_white', 'pct_black', 'pct_race_other'),
# totals_col = "total_vap")
## normalize results accounting for no vote using rpv_normalize()
## only include the candidate and race cols of interest for the rpv analysis
#rpv_results <- rpv_normalize(
# ei_object = rxcVote,
# cand_cols = c('pct_mcmaster', 'pct_smith', 'pct_other_gov'),
# race_cols = c('pct_white', 'pct_black')
#)
# }
Run the code above in your browser using DataLab