Calculates the mean weight of the community through time. This is simply the total biomass of the community divided by the abundance in 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.
getMeanWeight(sim, species = NULL, ...)
A MizerSim object
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.
Arguments passed on to
A vector containing the mean weight of the community through time
mean_weight <- getMeanWeight(NS_sim) years <- c("1967", "2010") mean_weight[years] #> 1967 2010 #> 0.7959689 0.4835935 getMeanWeight(NS_sim, species = c("Herring", "Sprat", "N.pout"))[years] #> 1967 2010 #> 0.6750526 0.5773987 getMeanWeight(NS_sim, min_w = 10, max_w = 5000)[years] #> 1967 2010 #> 36.12859 50.54693