assert_variables_exist function

Assert that all variables exist within a dataset

Assert that all variables exist within a dataset

Performs an assertion check to ensure that a vector of variable exists within a data.frame as expected.

assert_variables_exist(data, vars)

Arguments

  • data: a data.frame
  • vars: a character vector of variable names