Check that required levels of a variable are available in data

check_level_availability(
  data,
  data_name,
  expected_levels_list,
  throw_error = TRUE
)

Arguments

data

A tibble.

data_name

Character, holding name of dataset.

expected_levels_list

List holding variable names along with their expected levels. Variables must be present in data.

throw_error

Boolean indicating if to throw error. If FALSE warning is signaled instead.

Value

Returns data invisibly.