View source: R/15.2-analysis-nutritional.R
| calculate_np_ratios | R Documentation |
Calculates molar and mass N:P ratios for consumption, growth, excretion and egestion. Useful for understanding nutritional ecology and stoichiometric balance.
calculate_np_ratios(nitrogen_fluxes, phosphorus_fluxes, ratio_type = "mass")
nitrogen_fluxes |
List result from calculate_nutrient_balance (nitrogen component) |
phosphorus_fluxes |
List result from calculate_nutrient_balance (phosphorus component) |
ratio_type |
Type of ratio ("mass" or "molar"), default "mass" |
A named list with three elements:
Named numeric vector of length 4 giving the N:P ratio for
each process (consumed, growth, excretion,
egestion). Values may be Inf when phosphorus is zero and
NaN when both nutrients are zero.
Character. The ratio type as supplied ("mass" or
"molar").
Numeric. Reference Redfield ratio: 7.2 for mass ratios and 16 for molar ratios.
nitrogen <- list(consumed = 10, growth = 3, excretion = 5, egestion = 2)
phosphorus <- list(consumed = 1.5, growth = 0.5, excretion = 0.6, egestion = 0.4)
np_ratios <- calculate_np_ratios(nitrogen, phosphorus)
np_ratios$ratios
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.