merge_tables {blsR}R Documentation

Turn a list of one or more series into a single table of time series data

Description

merge_tables() turns a list of series as returned by data_as_table() into a single tibble

Usage

merge_tables(tables, join_by = c("year", "period"))

Arguments

tables

a named list of tables with matching periodicity. Mixing data with different (monthly, quarterly, annual) periodicity is unsupported. The list names will be used as column names in the output.

join_by

an optional character vector of columns to use to join tables. The result will be sorted in ascending order using these columns.

Value

tibble

See Also

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

Examples

## Not run: 
series_ids <- list(uer.men ='LNS14000001', uer.women = 'LNS14000002')
uer_series <- get_n_series(series_ids, 'your-api-key-here' )
uer_tables <- lapply(uer_series, function(x) data_to_table(x$data))
big_table <- merge_tables(uer_tables)

## End(Not run)


[Package blsR version 0.5.0 Index]