Calls other rate functions in sequence and collects the results in a list. The rates returned are encounter, feeding level, energy for growth and reproduction, predation rate, predation mortality, and resource mortality. The purpose of this function is to provide a convenient way to get all the rates at once, and to ensure that they are all calculated at the same time step with the same inputs. The rates are returned in a list with the same names as the rate functions that calculate them, so for example the encounter rate is returned in the list element named "encounter" and is calculated with the getEncounter() function.
getRates(
params,
n = initialN(params),
n_pp = initialNResource(params),
n_other = initialNOther(params),
effort,
t = 0,
...
)A MizerParams object
A matrix of species abundances (species x size).
A vector of the resource abundance by size
A list of abundances for other dynamical components of the ecosystem
The effort for each fishing gear
The time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.)
Unused
When mizer needs to calculate the rates during a simulation it does not use
this function but instead the faster projectRates().
Other rate functions:
getDiffusion(),
getEGrowth(),
getERepro(),
getEReproAndGrowth(),
getEncounter(),
getFMort(),
getFMortGear(),
getFeedingLevel(),
getFlux(),
getMort(),
getPredMort(),
getPredRate(),
getRDD(),
getRDI(),
getResourceMort()
rates <- getRates(NS_params)
names(rates)
identical(rates$encounter, getEncounter(NS_params))
Run the code above in your browser using DataLab