getCANSIM {CANSIM2R} | R Documentation |
getCANSIM
Description
Extracts a complete CANSIM (Statistics Canada) data table and converts it into a readily usable panel (wide) format.
Usage
getCANSIM(cansimTableNumber='', showLabels = TRUE, raw = FALSE, lang = 'eng')
Arguments
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. |
Details
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.
Value
data frame containing CANSIM table.
Examples
getCANSIM("12-10-0005")
getCANSIM("12-10-0005", lang = 'fra')
[Package CANSIM2R version 1.14.1 Index]