data_as_table: Convert a list of data entries as returned by BLS API to a...

View source: R/merge_tables.R

data_as_tableR Documentation

Convert a list of data entries as returned by BLS API to a table

Description

Convert a list of data entries as returned by BLS API to a table

Usage

data_as_table(data, parse_values = TRUE)

Arguments

data

a list of individual datum entries as returned by the API

parse_values

optional boolean. If set to TRUE (default) it will attempt to parse the contents of value and cast numeric strings as numeric values. If set to FALSE it will retain value as a column of strings.

Details

currently data_as_table is very similar to dplyr::bind_rows()

Value

tibble flattening data into rows for entries and columns for fields

See Also

Other blsR-utils: bls-api-key, data_as_tidy_table(), merge_tables(), merge_tidy_tables(), reduce_spanned_responses(), span_request_queries(), span_series_request(), tidy_periods(), tidy_table_as_zoo()

Examples

## Not run: 
series <- get_series('LNS14000001')
table <- data_as_table(series$data)

## End(Not run)

blsR documentation built on July 9, 2023, 5:29 p.m.