Plot the relative difference in between the total fishable biomasses of each each Species Group at steady state
plotTotalBiomassRelative.RdThis functions creates a barplot with the relative change in biomass of each Species Group within a size range between either (1) two different mizerParams objects (two models) or (2) two different size ranges.
Usage
plotTotalBiomassRelative(
object1,
object2,
diff_method,
species = NULL,
min_fishing_l1 = NULL,
max_fishing_l1 = NULL,
min_fishing_l2 = NULL,
max_fishing_l2 = NULL,
return_data = FALSE,
...
)
plotlyTotalBiomassRelative(object1, object2, diff_method, ...)Arguments
- object1
First MizerParams or MizerSim object.
- object2
Second MizerParams or MizerSim object.
- diff_method
The method to calculate the relative change between models. If
percent.change, the percent change is calculated relative to the value from object 1 with formula 100*(new-old)/old. Ifrel.diffthe relative difference is returned given by (new - old)/(old + new).- species
The groups to be selected. Optional. By default all target groups are selected. A vector of groups names, or a numeric vector with the groups indices, or a logical vector indicating for each group whether it is to be selected (TRUE) or not.
- min_fishing_l1
Optional. The minimum length (cm) of fished individuals for model 2. Defaults to 7cm. A parameter passed to
getProductivity().- max_fishing_l1
Optional. The maximum length (cm) of fished individuals for model 1. Defaults to max length. A parameter passed to
getProductivity().- min_fishing_l2
Optional. The minimum length (cm) of fished individuals for model 2. Defaults to 7cm. A parameter passed to
getProductivity().- max_fishing_l2
Optional. The maximum length (cm) of fished individuals for model 1. Defaults to max length. A parameter passed to
getProductivity().- return_data
A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default value is FALSE.
- ...
Arguments passed on to
plotTotalBiomassobjectAn object of class MizerParams
min_fishing_lThe minimum length (cm) for biomass estimates. Defaults to smallest size.
max_fishing_lThe maximum length (cm) of for biomass estimates. Defaults to max length.
Value
A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the the total steady state biomass for each functional
group by model is returned as well as another column called
rel_diffthat gives the relative difference between the two
values.
Details
This function is usually used in conjunction with
plotProductivityRelative() to check for decoupling between biomass and
productivity.
The individual productivity rates are calculated by the
plotTotalBiomass() function which is passed all additional arguments you
supply. See plotTotalBiomass() for more details.
To compare between different size ranges, use the min_fishing_l1
and max_fishing_l1 arguments for the first size range and the
min_fishing_l2and max_fishing_l2 arguments for the second.
See also
plotBiomass(), plot2TotalBiomass(), plotTotalBiomassRelative(),
plotProductivity(), plot2Productivity(), plotProductivityRelative()
Other plotting functions:
plot2Productivity(),
plot2TotalBiomass(),
plotBiomass(),
plotProductivity(),
plotProductivityRelative(),
plotRefuge(),
plotRelativeContribution(),
plotSpectraRelative(),
plotTotalAbundance(),
plotTotalBiomass(),
plotVulnerable()