get_cansim_vector_for_latest_periods {cansim} | R Documentation |
Retrieve data for specified Statistics Canada data vector(s) for last N periods
Description
Allows for the retrieval of data for specified vector series for the N most-recently released periods.
Usage
get_cansim_vector_for_latest_periods(
vectors,
periods = 1,
refresh = FALSE,
timeout = 200,
factors = TRUE,
default_month = "07",
default_day = "01"
)
Arguments
vectors |
The list of vectors to retrieve |
periods |
Numeric value for number of latest periods to retrieve data for |
refresh |
(Optional) When set to |
timeout |
(Optional) Timeout in seconds for downloading cansim table to work around scenarios where StatCan servers drop the network connection. |
factors |
(Optional) Logical value indicating if dimensions should be converted to factors. (Default set to |
default_month |
The default month that should be used when creating Date objects for annual data (default set to "07") |
default_day |
The default day of the month that should be used when creating Date objects for monthly data (default set to "01") |
Value
A tibble with data for specified vector(s) for the last N periods
Examples
## Not run:
get_cansim_vector_for_latest_periods("v41690973",10)
## End(Not run)