Learn R Programming

totalcensus (version 0.6.6)

search_tables: Search Tables

Description

Search table numbers and description.

Usage

search_tables(survey, years = NULL, keywords = NULL, view = TRUE)

Arguments

survey

survey type, including "dec" (or "decennial"), "acs1" or "acs5".

years

year or ending year of the survey, can be a single year such as 2010 or a vector like 2014:2016.

keywords

keyword to search in code or description, in the form like "abc def dsdfsa". Rows with all words are returned.

view

display the search result with View if TRUE

Value

A data.table

Examples

Run this code
# NOT RUN {
# Change view = TRUE (default) to View the returned data.
aaa <- search_tables("dec", 2010, "occupancy", view = FALSE)
bbb <- search_tables("acs5", 2014:2016, "detailed race", view = FALSE)

# }
# NOT RUN {
  # view all tables
  search_tables("dec")
  search_tables("acs1")
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab