dateCast {blscrapeR}R Documentation

Cast a date column to data frame returned by the bls_api() function

Description

A helper function to create a continuous date from Year and Period columns.

Usage

dateCast(api_df = NULL, dt_format = NULL)

Arguments

api_df

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.

dt_format

A character string containing a valid date format. The default will return the ISO 8601 date format.

Value

A tibble from the source api_df with an additional date column based on the date format given in dt_format.

Examples


## Cast a date column to data frame returned by the bls_api() function.
df <- bls_api("LAUCN040010000000005") %>%
dateCast()



[Package blscrapeR version 4.0.1 Index]