View source: R/summary_methods.R
| getBiomass | R Documentation |
Calculates the total biomass through time within user defined size limits.
The default option is to use the size range starting at the size specified
by the biomass_cutoff species parameter, if it is set, or else the full
size range of each species. You can specify minimum
and maximum weight or length range for the species. Lengths take precedence
over weights (i.e. if both min_l and min_w are supplied, only min_l will be
used).
getBiomass(object, use_cutoff = FALSE, ...)
object |
An object of class |
use_cutoff |
If TRUE, the |
... |
Arguments passed on to
|
When no size range arguments are provided, the function checks if the
biomass_cutoff column exists in the species parameters. If it does,
those values are used as the minimum weight for each species. For species
with NA values in biomass_cutoff, the default minimum weight (smallest
weight in the model) is used.
If called with a MizerParams object, a named vector with the biomass
in grams for each species in the model. If called with a MizerSim object,
an ArrayTimeBySpecies object (time x species) containing the biomass in
grams at each time step for all species.
Other summary functions:
getDiet(),
getGrowthCurves(),
getN(),
getSSB(),
getSteadyResidual(),
getTrophicLevel(),
getTrophicLevelBySpecies(),
getYield(),
getYieldGear()
biomass <- getBiomass(NS_sim)
biomass["1972", "Herring"]
biomass <- getBiomass(NS_sim, min_w = 10, max_w = 1000)
biomass["1972", "Herring"]
# If species_params contains a `biomass_cutoff`` column, it can be used
# as the minimum weight when use_cutoff = TRUE
species_params(NS_sim@params)$biomass_cutoff <- 10
biomass <- getBiomass(NS_sim, use_cutoff = TRUE) # Uses biomass_cutoff as min_w
biomass["1972", "Herring"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.