R/cansim.R
get_cansim_ndm.Rd
Retrieves a data table as a tidy dataframe using either an old-style CANSIM code or a new-format NDM table number. This function will automatically convert old-style CANSIM codes into their new equivalents. Retrieved table data is cached for the duration of the current R session only by default.
get_cansim_ndm(
cansimTableNumber,
language = "english",
refresh = FALSE,
timeout = 200
)
the table number to load, accepts old CANSIM or new NDM table numbers
"en"
or "english"
for English and "fr"
or "french"
for French language versions (default is set to English)
(Optional) When set to TRUE
, forces a reload of data table (default is FALSE
)
(Optional) Timeout in seconds for downloading cansim table to work around scenarios where StatCan servers drop the network connection.
A tibble with the StatCan table data
Deprecated, use `get_cansim` instead. This will be removed in future releases.
if (FALSE) {
# Retrieve a table with an NDM code
get_cansim("34-10-0013")
# Retrieve a table with an old-style CANSIM code
get_cansim("026-0018")
}