powered by
A helper function to create a continuous date from Year and Period columns.
dateCast(api_df = NULL, dt_format = NULL)
A tibble from the source api_df with an additional date column based on the date format given in dt_format.
api_df
dt_format
The data frame you wish to cast a date column to. Be sure the data frame contains 'year' and 'period' columns as returned by the bls_api() function.
bls_api()
A character string containing a valid date format. The default will return the ISO 8601 date format.
## Cast a date column to data frame returned by the bls_api() function. df <- bls_api("LAUCN040010000000005") %>% dateCast()
Run the code above in your browser using DataLab