get_cansim_sqlite | R Documentation |
Retrieves a data table using an NDM catalogue number as an SQLite table. Retrieved table data is cached permanently if a cache path is supplied or for duration of the current R session. The function will check against the lastest release data for the table and emit a warning message if the cached table is out of date.
get_cansim_sqlite(
cansimTableNumber,
language = "english",
refresh = FALSE,
auto_refresh = FALSE,
timeout = 1000,
cache_path = getOption("cansim.cache_path")
)
cansimTableNumber |
the NDM table number to load |
language |
|
refresh |
(Optional) When set to |
auto_refresh |
(Optional) When set to |
timeout |
(Optional) Timeout in seconds for downloading cansim table to work around scenarios where StatCan servers drop the network connection. |
cache_path |
(Optional) Path to where to cache the table permanently. By default, the data is cached in the path specified by 'getOption("cansim.cache_path")', if this is set. Otherwise it will use 'tempdir()'. |
A database connection to a local SQLite database with the StatCan Table data.
## Not run:
con <- get_cansim_sqlite("34-10-0013")
# Work with the data connection
head(con)
disconnect_cansim_sqlite(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.