The statcan_search() function has 2 arguments to fulfill to find a database: keywords and lang. The keywords argument refers to words that can be found in either the title or the description of the database. For example, inserting the keywords "economy","export",and "link" will bring up the title, table id, description, and release date for databases that include these keywords. In this case, only one data table ("Supply and use tables, link-1997 level") would be returned as it is the only data table containing all three words.

statcan_search(keywords, lang)

Arguments

keywords

The words that appear in the title or description of the data table

lang

The language wanted

Value

The output will be the title, id, description, and release date of a table

Details

Easily connect to Statistics Canada's Web Data Service with R. Open economic data (formerly known as CANSIM tables, now identified by Product IDs (PID)) are accessible as a data frame, directly in the user's R environment.

Examples

statcan_search(c("economy","export","link"),"eng")