Learn R Programming

fb4package (version 2.0.0)

process_predator_energy_data: Process predator energy data for equation 1 (PREDEDEQ = 1)

Description

Ensures ED_data is available as a numeric vector of length n_days + 1. Accepts either a pre-built vector via ED_data or a pair of scalars via ED_ini/ED_end (which are linearly interpolated to produce the full vector internally).

Usage

process_predator_energy_data(predator_params)

Value

Predator parameters list with ED_data populated.

Arguments

predator_params

List of predator parameters. Must include either:

ED_data

Numeric vector of length n_days + 1 (e.g., 366 for 365 days). Element [i] is the energy density at the boundary of day i-1. Generate with approx(..., xout = 0:n_days)$y or seq(ED_ini, ED_end, length.out = n_days + 1).

ED_ini + ED_end

Scalar start/end values; the function creates the full vector via linear interpolation.