get_cansim_table_survey: Retrieve Statistics Canada data table survey detail

get_cansim_table_surveyR Documentation

Retrieve Statistics Canada data table survey detail

Description

Returns table survey detail given an NDM table number in English or French. Retrieved table information data is cached for the duration of the R session only.

Usage

get_cansim_table_survey(
  cansimTableNumber,
  language = "english",
  refresh = FALSE,
  timeout = 200
)

Arguments

cansimTableNumber

the NDM table number to load

language

"english" (the default) or "french". Short forms such as "en", "eng", "fr" or "fra" are accepted, as are the French names "anglais" and "francais"; case and accents are ignored

refresh

(Optional) When set to TRUE, forces a reload of data table (default is FALSE)

timeout

(Optional) Number of seconds StatCan is allowed to go without sending data before the download is abandoned, to work around scenarios where StatCan servers drop the network connection. This does not limit how long a download may take overall, a transfer that keeps delivering data is left alone. StatCan prepares a whole response before sending any of it, which for large requests can take the better part of a minute, so values much below the default of 200 risk cutting off legitimate requests.

Value

A tibble with the table survey code and name

Returns NULL if the data could not be retrieved because StatCan is unavailable.

Examples


get_cansim_table_survey("34-10-0013")


cansim documentation built on Aug. 20, 2026, 1:07 a.m.