This function is a quick starter to working with the CPS, using all of the
defaults that are baked into this package. Because the data is so large, it
made more sense to ship a "basic" CPS data set as a function rather than as a
package data object (which would have been over 10 MB). This function will
take you from nothing to having some basic CPS data in your environment, with
the option to save this data locally for future ease. A sample of the data
that comes out of this function is provided as cpsvote::cps_allyears_100k.
Usage
cps_load_basic(
years = seq(1994, 2024, 2),
datadir = cps_data_dir(),
outdir = NULL
)Arguments
- years
Which years should be read
- datadir
The location where the CPS zip files live (or should be downloaded to). Defaults to
cps_data_dir(), which returns~/cps_dataunless overridden viaoptions(cpsvote.datadir = "your/path").- outdir
The location where the final data file should be saved to