| getZ | R Documentation |
getMort()
An alias provided for backward compatibility with mizer version <= 1.0
getZ(object, ...)
object |
A MizerParams or MizerSim object. |
... |
Additional arguments that depend on the class of For a MizerParams object:
For a MizerSim object:
|
If your model contains additional components that you added with
setComponent() and for which you specified a mort_fun function then
the mortality inflicted by these components will be included in the returned
value.
MizerParams: An ArraySpeciesBySize object (species x size) with the
total mortality rates.
MizerSim: An ArrayTimeBySpeciesBySize object (time step x species x
size) with the total mortality rates at every time step. If drop = TRUE
then dimensions of length 1 will be removed.
By default getMort() calls mizerMort(). However you can
replace this with your own alternative mortality function. If
your function is called "myMort" then you register it in a MizerParams
object params with
params <- setRateFunction(params, "Mort", "myMort")
Your function will then be called instead of mizerMort(), with the
same arguments.
getPredMort(), getFMort()
Other rate functions:
getDiffusion(),
getEGrowth(),
getERepro(),
getEReproAndGrowth(),
getEncounter(),
getFMort(),
getFMortGear(),
getFeedingLevel(),
getFlux(),
getFluxGradient(),
getPredMort(),
getPredRate(),
getRDD(),
getRDI(),
getRates(),
getResourceMort()
params <- NS_params
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the total mortality at a particular time step
mort <- getMort(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ],
t = 15, effort = 0.5)
# Mortality rate at this time for Sprat of size 2g
mort["Sprat", "2"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.