Calculates molar and mass N:P ratios for consumption, growth, excretion and egestion. Useful for understanding nutritional ecology and stoichiometric balance.
Value
A named list with three elements:
- ratios
Named numeric vector of length 4 giving the N:P ratio for each process (
consumed,growth,excretion,egestion). Values may beInfwhen phosphorus is zero andNaNwhen both nutrients are zero.- ratio_type
Character. The ratio type as supplied (
"mass"or"molar").- redfield_ratio
Numeric. Reference Redfield ratio: 7.2 for mass ratios and 16 for molar ratios.
Examples
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
#> consumed growth excretion egestion
#> 6.666667 6.000000 8.333333 5.000000
