check_level_availability: Check that required levels of a variable are available in...

View source: R/check_data.R

check_level_availabilityR Documentation

Check that required levels of a variable are available in data

Description

Check that required levels of a variable are available in data

Usage

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.


2DegreesInvesting/r2dii.climate.stress.test documentation built on June 6, 2024, 8:23 a.m.