getCANSIM {CANSIM2R} | R Documentation |
Extracts a complete CANSIM (Statistics Canada) data table and converts it into a readily usable panel (wide) format.
getCANSIM(cansimTableNumber='', showLabels = TRUE, raw = FALSE, lang = 'eng')
cansimTableNumber |
- the table number we wish to retrieve from CANSIM. |
showLabels |
- show the Statistics Canada labels after finishing extracting and converting the table, TRUE by default. |
raw |
- download the CANSIM table as-is, skipping all processing, FALSE by default. |
lang |
- language for data labels ('eng' for English or 'fra' for French), 'eng' by default. |
Geographic variables are renamed i, time variables are renamed t, and all the other variables are renamed with a generic V1, V2, ..., Vn. The generic variables keep the full Statistics Canada description by using a label.
data frame containing CANSIM table.
getCANSIM("12-10-0005")
getCANSIM("12-10-0005", lang = 'fra')