check_vars_exist: check variable existence in data set

Description Usage Arguments Value Examples

View source: R/check_vars_exist.R

Description

given a list of variables and a data set, checks if those variables exist and throws an error stating 'variable x not found' for whichever ones don't. I got fed up with opaque error messages caused by mistyped variable names. If you are nesting this inside another function and using tidy style remember to unquote (!!) the variables that you pass in. The function returns nothing if the variables exist.

Usage

1

Arguments

df

a tibble

...

list of variables to confirm existence of.

Value

Silent or Error

Examples

1
check_vars_exist(df = airquality, Ozone, Month)

williamlief/liefTools documentation built on Jan. 1, 2020, 6:48 p.m.