Learn R Programming

mizer (version 2.0.0)

getResourceMort: Get predation mortality rate for resource

Description

Calculates the predation mortality rate \(\mu_p(w)\) on the resource spectrum by resource size (in units 1/year).

Usage

getResourceMort(
  params,
  n = initialN(params),
  n_pp = initialNResource(params),
  n_other = initialNOther(params),
  pred_rate = getPredRate(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

pred_rate

An array of predation rates of dimension no. sp x no. community size bins x no. of size bins in whole spectra (i.e. community + resource, the w_full slot). The array is optional. If it is not provided it is calculated by the getPredRate() function.

Value

A vector of mortality rate by resource size.

Details

Used by the project function for running size based simulations.

See Also

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

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 resource mortality at one time step
n <- sim@n[21,,]
n_pp <- sim@n_pp[21,]
getResourceMort(params,n,n_pp)
# }

Run the code above in your browser using DataLab