Learn R Programming

fb4package (version 2.1.0)

process_nutrient_data: Process nutrient regeneration data

Description

Interpolates N and P time series from bio_obj$nutrient_data to daily values aligned with target_days. Returns NULL when no nutrient data is present.

Expected structure of bio_obj$nutrient_data:

prey_n_concentrations

data.frame with Day + one column per prey (g N/g wet wt)

prey_p_concentrations

data.frame with Day + one column per prey (g P/g wet wt)

predator_n_concentration

data.frame with Day + value column (g N/g wet wt)

predator_p_concentration

data.frame with Day + value column (g P/g wet wt)

n_assimilation_efficiency

data.frame with Day + one column per prey (fraction 0-1)

p_assimilation_efficiency

data.frame with Day + one column per prey (fraction 0-1)

Usage

process_nutrient_data(bio_obj, target_days, prey_names)

Value

Named list with interpolated daily arrays, or NULL

Arguments

bio_obj

Bioenergetic object

target_days

Target simulation days

prey_names

Character vector of prey names