get_series {blsR}R Documentation

Create and execute query for a single time series

Description

Create and execute query for a single time series

Usage

get_series(
  series_id,
  start_year = NULL,
  end_year = NULL,
  year_limit = NULL,
  span = TRUE,
  api_key = bls_get_key(),
  ...
)

Arguments

series_id

Character scalar BLS series ID

start_year, end_year

numeric 4-digit years. While optional, they are strongly recommended. If one is provided, the other is mandatory. end_year must be greater than start_year

year_limit

optional number of years to paginate request by. If not explicitly set, it will be set to 10 or 20 depending on if an api_key is available

span

when set to TRUE, requests where the number of years between start_year and end_year exceed year_limit will be performed as multiple requests automatically

api_key

Optional. An API key string. Defaults to the value returned by bls_get_key(). The preferred way to provide an API key is to use bls_set_key() or the BLS_API_KEY environment variable. Manually passing the key will be deprecated in future releases.

...

additional arguments to pass to bls_request()

Value

a single series result, in list form. The resulting list will have the following items:

See Also

query_series

Other blsR-requests: bls_request(), get_all_surveys(), get_latest_observation(), get_n_series_table(), get_n_series(), get_popular_series(), get_series_tables(), get_series_table(), get_survey_info(), reduce_spanned_responses(), span_series_request()

Examples

## Not run: 
series <- get_series('LNS14000001')

## End(Not run)

[Package blsR version 0.5.0 Index]