statcanR download data function
statcan_download_data(tableNumber, lang)
The table number of the Statistics Canada data table
The language wanted
The output will be a data table and csv file representing the data associated with the chosen table number.
mydata <- statcan_data('27-10-0014-01', 'eng')
#> statcanR: downloading remote table.
#> Warning: One or more parsing issues, call `problems()` on your data frame for details,
#> e.g.:
#> dat <- vroom(...)
#> problems(dat)
#> Rows: 61 Columns: 10
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (8): Cube Title, Product Id, CANSIM Id, URL, Cube Notes, Archive Status...
#> num (1): Total number of dimensions
#> date (1): End Reference Period
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.