auselect_winners: Retrieve a .csv dataset from the australian_elections GitHub...

Description Usage Arguments Details Value Examples

View source: R/auselect_winners.R

Description

auselect_winners() downloads and assigns a filtered dataset based upon the election winners to a given variable.

Usage

1
auselect_winners(w_ids = T)

Arguments

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.

Details

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.

Value

A filtered dataset with either unique identifier values or no unique identifier values as specified by w_ids.

Examples

 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)

RohanAlexander/AustralianElections documentation built on Dec. 18, 2021, 10:59 a.m.