Description Usage Arguments Details Value Examples
View source: R/get_repsandsenate.R
‘get_reps_senate()' generates a dataset for members’ service time for the Australian House of Representatives, the Australian Senate, or a joined dataset containing values for both the HoR and Senate. Additionally, will produce a set of arguments that can be used as request codes for the individual datasets.
1 |
x |
A character string used to request a printout of the request code arguments, *see Request Codes* below, or one of three prepared datasets. |
There are four request codes: 'reps_senate', 'reps', 'senate' and 'codes'.
The specifics of these are:
- 'reps_senate' - generates a dataset of HoRs and Senate members; - 'reps' - generates a dataset of HoRs members; - 'senate' - generates a dataset of Senate members; and - 'codes' - returns a tibble of codes used to request data.
An incorrect request code (an argument not associated with a dataset or non-character string argument) will stop function processes and return an error message.
A console printout of a tibble containing arguments to be used with the function,
or the requested dataset using x
assigned to a user created variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# Generate a printout of the arguments.
get_reps_senate("codes")
# Generate combined HoR and Senate dataset.
reps_senate <- get_reps_senate("reps_senate")
# Preview dataset.
head(reps_senate)
# Generate only HoR dataset.
reps <- get_reps_senate("reps")
# Preview dataset.
head(reps)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.