Skip to contents

This function is intended to be used to check that the count data that gets passed into preprocess_count_data() contains the required columns. If it does not, we want to tell the user which columns are missing. This will not however, ensure that the elements of the column are of the right type, or check that the values of them make sense.

Usage

assert_req_count_cols_present(
  count_data,
  count_col_name,
  pop_size_col_name,
  add_req_col_names = c("date"),
  call = rlang::caller_env()
)

Arguments

count_data

tibble containing the input count data

count_col_name

string indicating the name of the column containing the count data

pop_size_col_name

string indicating the name of the column containing the population size of the count catchment area

add_req_col_names

vector of strings indicating the required count data column names, the defaults is "date"

call

Calling environment to be passed to cli::cli_abort() for traceback.

Value

NULL, invisibly