View source: R/nocontest_vs_abstain.R
filter_existing | R Documentation |
Filter down a long dataset to precinct-ballot style combinations for which that contest race exists. Otherwise, observation is dropped
filter_existing(tbl, pattern, race, na_thresh = 0.8, gtbl = NULL)
tbl |
dataset |
pattern |
regex to identify the race. Must resolve to one variable |
race |
tabulation of votes |
na_thresh |
how much NAs can is still a abstention? |
gtbl |
join with a table with more district information like county. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.