Description Usage Arguments Details Value Examples
View source: R/auselect_twopp.R
auselect_twopp()
downloads and assigns a filtered dataset to a given variable.
1 | auselect_twopp(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_twopp()
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 based upon where two party preferred (twoPP
) is true (a value of 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.
twopp_ids <- auselect_twopp()
# Preview dataset
head(twopp_ids)
# Request the filtered dataset without unique ids.
twopp_noids <- auselect_twopp(w_ids = F)
# Preview the dataset.
head(twopp_noids)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.