Learn R Programming

mizer (version 2.0.0)

getPredRate: Get predation rate

Description

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 getPredMort() to calculate the realised predation mortality rate on the prey individual.

Usage

getPredRate(
  params,
  n = initialN(params),
  n_pp = initialNResource(params),
  n_other = initialNOther(params),
  feeding_level = getFeedingLevel(params, n = n, n_pp = n_pp, n_other = n_other)
)

Arguments

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

feeding_level

The current feeding level (optional). A matrix of size no. species x no. size bins. If not supplied, is calculated internally using the getFeedingLevel() function.

Value

A two dimensional array (predator species x prey size), where the prey size runs over fish community plus resource spectrum.

See Also

Other rate functions: getEGrowth(), getEReproAndGrowth(), getERepro(), getEncounter(), getFMortGear(), getFMort(), getFeedingLevel(), getMort(), getPredMort(), getRDD(), getRDI(), getResourceMort()

Examples

Run this code
# NOT RUN {
params <- newMultispeciesParams(NS_species_params_gears, inter)
# 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
n <- sim@n[21,,]
n_pp <- sim@n_pp[21,]
getPredRate(params,n,n_pp)
# }

Run the code above in your browser using DataLab