Skip to contents

Retrieves the most recent observation for every series group. This makes one request per series group - upwards of 2500 of them - and is cached for the duration of the current R session.

Usage

get_boc_all_series_last_date(
  quarter_convention = getOption("canbank.quarter_convention", "middle"),
  quiet = TRUE,
  refresh = FALSE
)

Arguments

quarter_convention

(Optional) Which day to use for observations the API reports as a quarter rather than a date, see get_boc_series_group. Defaults to getOption("canbank.quarter_convention", "middle").

quiet

(Optional) Don't emit messages or warnings if TRUE, default is TRUE

refresh

(Optional) Refresh currently cached data if TRUE, default is FALSE

Value

a tibble with series, series group and last available date (NA for series that are not indexed by date), or NULL if the API could not be reached

Details

Returns NULL, with a warning, if the Bank of Canada API cannot be reached or refuses the request.

Examples

# Not run because it issues one request per series group, upwards of 2500 of
# them, which takes several minutes and is a heavy load on the API.
if (FALSE) { # \dontrun{
last_dates <- get_boc_all_series_last_date()
} # }