search_in_columns: Search for terms in a glossary in case-insensitive ways

search_in_columnsR Documentation

Search for terms in a glossary in case-insensitive ways

Description

Each of the dynamic arguments to this function must be a named array of strings. The function will look for each string in the column of .dataframe that corresponds to the argument's name. For example, providing the argument Universe = c("Wom[ae]n", "years?") will search the "Universe" column for any elements that include both "women" or "woman" and "year" or "years". The search is NOT case-sensitive. You can also exclude patterns by prefacing the column name with "-". For example, the argument "-Universe" = "household" will exclude rows where the "Universe" column contains the string "household".

Usage

search_in_columns(.dataframe, ...)

Arguments

.dataframe

the table to search in

...

<rlang::dyn-dots> Named arrays of search terms.

Value

<dfr> a filtered version of .dataframe

Examples

hercacstables::search_in_columns(
  hercacstables::METADATA_FOR_ACS_GEOGRAPHIES,
  `Wildcard Option` = "."
)
hercacstables::search_in_columns(
  hercacstables::METADATA_FOR_ACS_GEOGRAPHIES,
  `-Wildcard Option` = "."
)

higherX4Racine/hercacstables documentation built on Jan. 15, 2025, 9:58 p.m.