Skip to contents

Check that all names are among column names

Usage

check_all_colnames(df, x, null_ok = TRUE, qualifier = NULL)

Arguments

df

(data.frame)

x

(character) the names of the columns to be checked.

null_ok

(flag) can x be NULL.

qualifier

(string) to be returned if the check fails.

Examples

check_all_colnames(mtcars, c("mpg", "new", "hoho"), qualifier = "first test:")
#> [1] "first test: Expected column names: new, hoho not in mtcars"