Skip to contents

utility to check if a variable or term is in map_headernames and where

Usage

varin_map_headernames(
  query = "lowinc",
  ignore.case = TRUE,
  exact = FALSE,
  cols_with_names = c("oldname", "apiname", "api_synonym", "acsname", "csvname",
    "ejscreen_csv", "rname", "topic_root_term", "basevarname", "denominator",
    "shortlabel", "longname", "description", "csvlongname", "api_description",
    "acs_description", "varlist")
)

Arguments

query

variable name or fragment (or regular expression) to look for in map_headernames columns, looking within just column names listed in cols_with_names. Or a vector of query terms in which case this returns one column per query term.

ignore.case

optional, like in grepl()

exact

set to TRUE for only exact matches

cols_with_names

optional, colnames of map_headernames to check in

Value

data.frame of info about where query was found and how many hits.

See also

Examples

varin_map_headernames("spanish")
varin_map_headernames("lowinc")
varin_map_headernames("pop")
varin_map_headernames("POV", ignore.case = T)
varin_map_headernames("POV", ignore.case = F)

varin_map_headernames( "traffic.score", exact = T)

varin_map_headernames( "traffic" )

t(varinfo("traffic.score", 
  info = c("oldname","apiname", "acsname" ,"csvname", 
  "basevarname", 'shortlabel', 'longname', 'varlist')))