View source: R/rate_functions.R
| getERepro | R Documentation |
Calculates the energy rate (grams/year) available for reproduction after growth and metabolism have been accounted for.
getERepro(object, ...)
object |
A MizerParams or MizerSim object. |
... |
Additional arguments that depend on the class of For a MizerParams object:
For a MizerSim object:
|
MizerParams: An ArraySpeciesBySize object (species x size) holding
\psi_i(w)\max(0, E_{r.i}(w))
where E_{r.i}(w) is the rate at which energy becomes available for
growth and reproduction, calculated with getEReproAndGrowth(),
and \psi_i(w) is the proportion of this energy that is used for
reproduction. Negative values of E_{r.i}(w) are clipped to 0 before
multiplying by \psi_i(w). This proportion is taken from the params
object and is set with setReproduction().
MizerSim: An ArrayTimeBySpeciesBySize object (time step x species x
size) with the energy for reproduction at every time step. If drop = TRUE
then dimensions of length 1 will be removed.
By default getERepro() calls mizerERepro(). However you can
replace this with your own alternative reproduction rate function. If
your function is called "myERepro" then you register it in a MizerParams
object params with
params <- setRateFunction(params, "ERepro", "myERepro")
Your function will then be called instead of mizerERepro(), with the
same arguments.
Other rate functions:
getDiffusion(),
getEGrowth(),
getEReproAndGrowth(),
getEncounter(),
getFMort(),
getFMortGear(),
getFeedingLevel(),
getFlux(),
getFluxGradient(),
getMort(),
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 rate at a particular time step
erepro <- getERepro(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
# Rate at this time for Sprat of size 2g
erepro["Sprat", "2"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.