Skip to contents

Checks that a creel_schedule (or plain data frame intended for use with creel_design()) has the required columns, correct types, and sensible values. Called by read_schedule() after coercion and available for users to validate hand-constructed schedules.

Usage

validate_creel_schedule(data)

Arguments

data

A data frame to validate.

Value

Invisibly returns the input data frame on success. Aborts with an informative error message on validation failure.

Examples

sched <- generate_schedule(
  start_date    = "2024-06-01",
  end_date      = "2024-06-14",
  n_periods     = 1,
  sampling_rate = c(weekday = 0.3, weekend = 0.6),
  seed          = 42
)
validate_creel_schedule(sched)