search_tablecontents: Search Table Contents

View source: R/search_census_and_acs.R

search_tablecontentsR Documentation

Search Table Contents

Description

Search in lookup datasets of each survey to find references of table_contents argument in function read_decennial, read_acs1year, and read_acs5year.

Usage

search_tablecontents(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

# Change view = TRUE (default) to View the returned data.
# search by what you want
aaa <- search_tablecontents("dec", 2000, "federal prison", view = FALSE)

## Not run: 
  # view all decennial census table contents
  search_tablecontents("dec")

  # view all ACS 5 year table contents
  search_tablecontents("acs5")

## End(Not run)


GL-Li/rawcensus2010 documentation built on Jan. 19, 2024, 7:11 p.m.