CANSIM2R (version 1.14.1)

getCANSIM: 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.

Value

data frame containing CANSIM table.

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.

Examples

Run this code
# NOT RUN {
getCANSIM("12-10-0005")
getCANSIM("12-10-0005", lang = 'fra')
# }

Run the code above in your browser using DataLab