Description Usage Arguments Details Value Examples
View source: R/auselect_winners.R
auselect_winners()
downloads and assigns a filtered dataset based upon the election winners to a given variable.
1 | auselect_winners(w_ids = T)
|
w_ids |
A boolean value used to determine if the dataset is returned with or without a unique identifier column. Default is set to TRUE, which returns a dataset with the unique identifier column. |
The auselect_winners()
function is used to return a pre-filtered version of either the voting_data_with_ids
or voting_data
datasets.
On call, the function will filter the requested dataset with only election winners (dummyWinners == 1
).
The default dataset that is downloaded through this function is the voting_data_with_ids
dataset.
Setting the argument value of the function to w_ids = F
will set the function to instead download the voting_data
dataset.
A filtered dataset with either unique identifier values or no unique identifier values as specified by w_ids
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Return the filtered dataset with unique ids.
winners_ids <- auselect_winners()
# Preview dataset
head(winners_ids)
# Request the filtered dataset without unique ids.
winners_noids <- auselect_winners(w_ids = F)
# Preview the dataset.
head(winners_noids)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.