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
Run the code above in your browser using DataLab