get_basic {cpsR} | R Documentation |
Load basic monthly CPS microdata
Description
get_basic()
loads
basic monthly CPS
microdata using the Census API.
Usage
get_basic(
year,
month,
vars,
key = get_key(),
show_url = FALSE,
tibble = TRUE,
convert = TRUE
)
Arguments
year |
Year of data to retrieve. Years 1989 and on are currently supported. |
month |
Month of data to retrieve (specified as a number). |
vars |
Character vector of variables to retrieve, where each vector element corresponds to the name of a single variable. Variable names can be given in uppercase or lowercase but are always made lowercase in the returned data. |
key |
Census API key.
Defaults to environment variable |
show_url |
If |
tibble |
If |
convert |
If |
Value
A tibble or base data frame.
Examples
## Not run:
sep21 <- get_basic(
year = 2021,
month = 9,
vars = c("pwcmpwgt", "prpertyp", "prtage", "pemlr")
)
## End(Not run)