getCANSIM: getCANSIM

Description Usage Arguments Details Value Examples

View source: R/getCANSIM.r

Description

Extracts a complete CANSIM (Statistics Canada) data table and converts it into a readily usable panel (wide) format.

Usage

1
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

1
2
getCANSIM("12-10-0005")
getCANSIM("12-10-0005", lang = 'fra')

MarcoLugo/CANSIM2R documentation built on May 28, 2019, 1:47 p.m.