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

Description Usage Arguments Details Value Examples

View source: R/auselect_twopp.R

Description

auselect_twopp() downloads and assigns a filtered dataset to a given variable.

Usage

1
auselect_twopp(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_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.

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.
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)

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