Learn R Programming

AustralianPoliticians (version 0.1.0)

get_auspol: Retrieve a csv dataset from the australian_politicians repository.

Description

`get_auspol()` downloads a requested Australian politicians .csv dataset using an associated argument.

Usage

get_auspol(df)

Arguments

df

A character string used to request an Australian politicians dataset. *See Request Codes* below.

Value

The requested dataset using df to a user assigned name.

Details

There are four request codes: `all`, `allbyparty`, `mps` and `senators`.

The specifics of these are:

- `all` requests the australian_politicians-all.csv dataset. - `allbyparty` requests the australian_politicians-all-by_party.csv dataset. - `mps` requests the australian_politicians-mps-by_division.csv dataset. - `senators` requests the australian_politicians-senators-by_state.csv dataset.

An incorrect request (an argument not associated with a dataset or non-character string argument) will stop function processes and return an error message.

See Also

`show_datacodes()` function help.

Examples

Run this code
# NOT RUN {
# Request the Senators by State dataset.
senators_df <- get_auspol("senators")

# Preview first 10 observations of the dataset.
head(senators_df, 10)
# }

Run the code above in your browser using DataLab