getM2Background | R Documentation |
getResourceMort()
An alias provided for backward compatibility with mizer version <= 1.0
getM2Background(
params,
n = initialN(params),
n_pp = initialNResource(params),
n_other = initialNOther(params),
t = 0,
...
)
params |
A MizerParams object |
n |
A matrix of species abundances (species x size). |
n_pp |
A vector of the resource abundance by size |
n_other |
A list of abundances for other dynamical components of the ecosystem |
t |
The time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.) |
... |
Unused |
A vector of mortality rate by resource size.
By default getResourceMort()
calls mizerResourceMort()
. However you can
replace this with your own alternative resource mortality function. If
your function is called "myResourceMort"
then you register it in a MizerParams
object params
with
params <- setRateFunction(params, "ResourceMort", "myResourceMort")
Your function will then be called instead of mizerResourceMort()
, with the
same arguments.
Other rate functions:
getEGrowth()
,
getERepro()
,
getEReproAndGrowth()
,
getEncounter()
,
getFMort()
,
getFMortGear()
,
getFeedingLevel()
,
getMort()
,
getPredMort()
,
getPredRate()
,
getRDD()
,
getRDI()
,
getRates()
params <- NS_params
# With constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get resource mortality at one time step
getResourceMort(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.