View source: R/indicator_functions.R
| getMeanMaxWeight | R Documentation |
Calculates the mean maximum weight of the community. This can be calculated
by numbers or biomass. The calculation is the sum of the w_inf * abundance
of each species, divided by the total abundance community, where abundance is
either in biomass or numbers. 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). You can also
specify the species to be used in the calculation.
getMeanMaxWeight(object, species = NULL, measure = "both", ...)
object |
A MizerSim or MizerParams object |
species |
The species to be selected. Optional. By default all target species are selected. A vector of species names, or a numeric vector with the species indices, or a logical vector indicating for each species whether it is to be selected (TRUE) or not. |
measure |
The measure to return. Can be 'numbers', 'biomass' or 'both' |
... |
Arguments passed on to
|
Depends on the measure argument. If measure = “both”
then you get a matrix with two columns, one with values by numbers,
the other with values by biomass at each saved time step (or a named
vector with two entries for MizerParams). If measure =
“numbers” or “biomass” you get a vector of the respective values
at each saved time step (or a single value for MizerParams).
Other functions for calculating indicators:
getCommunitySlope(),
getMeanWeight(),
getProportionOfLargeFish()
mmw <- getMeanMaxWeight(NS_sim)
years <- c("1967", "2010")
mmw[years, ]
getMeanMaxWeight(NS_sim, species=c("Herring","Sprat","N.pout"))[years, ]
getMeanMaxWeight(NS_sim, min_w = 10, max_w = 5000)[years, ]
getMeanMaxWeight(NS_params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.