View source: R/project_methods.R
mizerPredRate | R Documentation |
Calculates the potential rate (in units 1/year) at which a prey individual of
a given size w
is killed by predators from species j
. In formulas
{\tt pred\_rate}_j(w_p) = \int \phi_j(w,w_p) (1-f_j(w))
\gamma_j(w) N_j(w) \, dw.
This potential rate is used in the function mizerPredMort()
to
calculate the realised predation mortality rate on the prey individual.
You would not usually call this
function directly but instead use getPredRate()
, which then calls this
function unless an alternative function has been registered, see below.
mizerPredRate(params, n, n_pp, n_other, t, feeding_level, ...)
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.) |
feeding_level |
An array (species x size) with the feeding level as
calculated by |
... |
Unused |
A named two dimensional array (predator species x prey size) with the predation rate, where the prey size runs over fish community plus resource spectrum.
By default getPredRate()
calls mizerPredRate()
. However you can
replace this with your own alternative predation rate function. If
your function is called "myPredRate"
then you register it in a MizerParams
object params
with
params <- setRateFunction(params, "PredRate", "myPredRate")
Your function will then be called instead of mizerPredRate()
, with
the same arguments.
Other mizer rate functions:
mizerEGrowth()
,
mizerERepro()
,
mizerEReproAndGrowth()
,
mizerEncounter()
,
mizerFMort()
,
mizerFMortGear()
,
mizerFeedingLevel()
,
mizerMort()
,
mizerPredMort()
,
mizerRDI()
,
mizerRates()
,
mizerResourceMort()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.