Skip to contents

Validates consistency between diet composition and prey energy density data, ensuring they have matching prey species and valid values.

Usage

validate_diet_consistency(diet_data, energy_data)

Arguments

diet_data

Data frame with diet proportions

energy_data

Data frame with prey energies

Value

NULL (throws error if inconsistent)

Details

Validation includes:

  • Matching prey species columns between datasets

  • Diet proportions sum approximately to 1.0

  • No negative diet proportions

  • All prey energies are positive

Examples

if (FALSE) { # \dontrun{
diet <- data.frame(Day = 1:5, fish = 0.6, zooplankton = 0.4)
energy <- data.frame(Day = 1:5, fish = 4000, zooplankton = 2500)
validate_diet_consistency(diet, energy)
} # }