Description Usage Arguments Value
Read one year of data from the Current Population Survey
1 2 3 4 5 6 | cps_read_year(
file,
cols = cpsvote::cps_cols,
names_col = "new_name",
year = as.numeric(stringr::str_extract(file, "\\d{4}"))
)
|
file |
Where the fixed-width or zip/gz file for this year's data lives |
cols |
Which columns to read. This must be a data frame, with required
columns |
names_col |
The column in |
year |
Which year is being read; defaults to 4-digit year in file name |
a data frame, with dimensions depending on the year and columns specified
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.