# The biomass of each species, i.e. what getBiomass() does
sizeIntegral(NS_params, weighting = NS_params@w)
# ... restricted to a size range
sizeIntegral(NS_params, weighting = NS_params@w, min_w = 10, max_w = 1000)
# The numbers of individuals larger than 10g
sizeIntegral(NS_params, min_w = 10)
# Spawning stock biomass: the weighting is the product maturity * w
K <- sweep(NS_params@maturity, 2, NS_params@w, "*")
sizeIntegral(NS_params, weighting = K)
# An indicator through time, ready to plot
biomass <- sizeIntegral(NS_sim, weighting = NS_params@w,
value_name = "Biomass", units = "g")
biomass[c("1972", "2010"), c("Herring", "Cod")]
Run the code above in your browser using DataLab