Calculates the potential rate (in units 1/year) at which a prey individual of
a given size getPredMort()
to
calculate the realised predation mortality rate on the prey individual.
getPredRate(
params,
n = initialN(params),
n_pp = initialNResource(params),
n_other = initialNOther(params),
t = 0,
...
)
A two dimensional array (predator species x prey size), where the prey size runs over fish community plus resource spectrum.
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 time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.)
Unused
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 rate functions:
getEGrowth()
,
getERepro()
,
getEReproAndGrowth()
,
getEncounter()
,
getFMort()
,
getFMortGear()
,
getFeedingLevel()
,
getMort()
,
getPredMort()
,
getRDD()
,
getRDI()
,
getRates()
,
getResourceMort()
# \donttest{
params <- NS_params
# Predation rate in initial state
pred_rate <- getPredRate(params)
str(pred_rate)
# With constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the feeding level at one time step
pred_rate <- getPredRate(params, n = N(sim)[15, , ],
n_pp = NResource(sim)[15, ], t = 15)
# }
Run the code above in your browser using DataLab