find_vars: Find matching column names

Description Usage Arguments Details Value Functions

Description

Find the names of variable(s) matching a given pattern. If there are no matches, display an error message and stop.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
find_all_vars(
  input_data,
  ...,
  suffix = NULL,
  .strict = FALSE,
  verbose = getOption("verbose")
)

find_var(input_data, pattern, suffix = NULL, verbose = getOption("verbose"))

find_id_var(input_data, ...)

find_qty_var(input_data, ...)

find_year_var(input_data, ...)

Arguments

input_data

(tabular data) must have one or more columns

...

variables to find (explicitly)

suffix

retained for backwards compatibility, but prefer 'pattern' instead

.strict

passed to 'tidyselect::eval_select()'

verbose

(logical) display messages

pattern

(character) regular expression (also see [glob2rx()])

Details

'find_var()' stops if more than one variable in 'input_data' matches 'pattern'.

Value

(character) name of variable(s) matching 'pattern'.

Functions


BAAQMD/vartools documentation built on May 20, 2020, 1:35 a.m.