- vars
Default is NULL. If left blank, returns all variables within the
dataset. Takes a string or vector of strings. See
get_var_info
for pulling variable names and
get_cites
for citations of specific variables and datasets.
Names of variables must be exact matches to variables in the dataset.
- var_category
Default is NA. If left blank, returns all datasets. Takes
a string or vector of strings.
Options are one of, or a combination of: "demographics", "economic-fiscal",
"government", "elections", "policy_ideology", "criminal justice",
"education", "healthcare", "welfare", "rights", "environment",
"drug-alcohol", "gun control", "labor", "transportation", "misc.
regulation"
- states
Default is NULL. If left blank, returns all states. Takes a
string or vector of strings of state abbreviations. Use state.abb
to
load state abbreviations into the R environment.
- years
Default is NULL. If left blank, returns all years. Coverage
begins at 1900 and runs to 2019. However, coverage depends on the specific
variable -- see get_var_info
.
Input can be a vector of years (or a singular year), such as c(2000, 2001,
2002, 2012) or seq(2000, 2012).
- core
Default is FALSE. If TRUE, merge the core CSPP data (approximately 70 common and important variables) with the search result.
- output
Default is NULL. One of "csv", "dta", "rdata". Optional
parameter for writing the resulting dataframe to a file.
- path
The directory to write the file to. Default is blank, so writes to
working directory. Exclude final slash: e.g., path = "dir1/dir2"