View source: R/15.2-analysis-nutritional.R
| assess_diet_quality | R Documentation |
Assesses the nutritional quality of the diet based on energy density, macronutrient composition, and digestibility of prey items.
assess_diet_quality(diet_data, prey_energies, prey_digestibility = NULL)
diet_data |
Diet composition data from FB4 simulation |
prey_energies |
Energy densities of prey items |
prey_digestibility |
Digestibility coefficients of prey items |
A named list whose elements depend on whether the diet is
time-varying or static. Always present: mean_energy_density
(numeric, J/g), energy_density_sd (numeric), and
energy_density_range (numeric vector of length 2). For
time-varying diets, daily_energy_density (numeric vector) is
also included. When prey_digestibility is supplied, the list
additionally contains mean_digestibility, digestibility_sd,
and (for time-varying diets) daily_digestibility. A
diversity sub-list with mean_shannon and
shannon_sd (and daily_shannon for time-varying diets) is
always appended.
diet <- list(proportions = data.frame(Day = 1:5,
Prey1 = c(0.6, 0.6, 0.7, 0.5, 0.5),
Prey2 = c(0.4, 0.4, 0.3, 0.5, 0.5)))
prey_e <- data.frame(Day = 1:5, Prey1 = 5000, Prey2 = 4500)
assess_diet_quality(diet, prey_e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.