| plotYieldVsF | R Documentation |
Varies the fishing mortality on one species over a range of values, leaving
the fishing on every other species unchanged, and plots the long-term yield
of that species against it. The fishing mortality at which the yield is
largest is F_{MSY}, and is marked on the plot by default.
This is scanModel() with scanFishingMortality() as its setter and
getYield() as the quantity it measures. Use scanModel() directly to vary
something other than the fishing mortality on a single species, to measure
something other than the yield, or to follow more than one species at once.
At each fishing mortality the model is projected until it settles, and what
is plotted depends on what it settled on. At a fixed point the yield is read
straight off the settled state. On a limit cycle it is averaged over exactly
one period, and the band around the line shows the range the yield covers
over that cycle, so an oscillation is displayed rather than silently averaged
away. Fishing mortalities at which the model settled on neither are marked
with a cross and should not be relied on; raise t_max for those.
The scan starts from the fishing mortality the model currently sits at and works outwards in both directions, each arm warm-starting from the attractor reached at the previous value.
plotYieldVsF(
params,
species,
F_range,
F_min = 0,
F_max = 1.5,
no_steps = 16,
gear = NULL,
style = "ribbon",
mark_max = TRUE,
reference_lines = TRUE,
log_y = FALSE,
log = NULL,
return_data = FALSE,
progress_bar = interactive(),
...
)
params |
A MizerParams object. |
species |
The name of the species whose fishing mortality is varied. Only one species at a time. |
F_range |
A numeric vector of fishing mortalities for the x-axis. If
missing it is built as |
F_min, F_max, no_steps |
Used to build |
gear |
The name of the gear whose fishing mortality on the species is
varied. Only needed when several gears catch the species; if NULL
(default), the fishing mortality from all of them is replaced. See
|
style |
How the range covered on a limit cycle is drawn, see
|
mark_max |
Whether to mark the fishing mortality at which the yield is
largest, which is |
reference_lines |
Whether to draw reference lines (the current fishing
mortality as "Current F", and the |
log_y, log |
Whether to use a logarithmic y-axis, see |
return_data |
If TRUE the MizerScan object underlying the plot is returned instead of the plot. Default FALSE. |
progress_bar |
If TRUE a text progress bar is shown while the fishing
mortalities are swept. Defaults to |
... |
Further arguments are passed on to |
A ggplot2 object, or, if return_data = TRUE, the MizerScan object
holding the data. The fishing mortality giving the largest yield is
available from that object as attr(scan, "at_max").
scanModel(), scanFishingMortality(), plot.MizerScan(),
getYield()
Other plotting functions:
addPlot(),
animate(),
plot,
plot2(),
plotBiomass(),
plotCDF(),
plotCDF2(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotRelative(),
plotSpectra(),
plotSpectra2(),
plotSpectraRelative(),
plotYield(),
plotYieldGear(),
plotting_functions
Other scan functions:
MizerScan(),
plot.MizerScan(),
scanEffort(),
scanModel()
plotYieldVsF(NS_params, "Cod", F_max = 1.5, no_steps = 8)
# The fishing mortality that maximises the yield
scan <- plotYieldVsF(NS_params, "Cod", F_max = 1.5, no_steps = 8,
return_data = TRUE)
attr(scan, "at_max")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.