Learn R Programming

mizer (version 1.0.1)

getZ: Get total mortality rate

Description

Calculates the total mortality rate \(\mu_i(w)\) on each species by size from predation mortality, background mortality and fishing mortality for a single time step.

Usage

getZ(object, n, n_pp, effort, m2)

# S4 method for MizerParams,matrix,numeric,numeric,matrix getZ(object, n, n_pp, effort, m2)

# S4 method for MizerParams,matrix,numeric,numeric,missing getZ(object, n, n_pp, effort)

Arguments

object

A MizerParams object.

n

A matrix of species abundance (species x size).

n_pp

A vector of the background abundance by size.

effort

A numeric vector of the effort by gear or a single numeric effort value which is used for all gears.

m2

A two dimensional array of predation mortality (optional). Has dimensions no. sp x no. size bins in the community. If not supplied is calculated using the getM2() method.

Value

A two dimensional array (prey species x prey size).

See Also

getM2, getFMort

Examples

Run this code
# NOT RUN {
data(NS_species_params_gears)
data(inter)
params <- MizerParams(NS_species_params_gears, inter)
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the total mortality at a particular time step
getZ(params,sim@n[21,,],sim@n_pp[21,],effort=0.5)
# }

Run the code above in your browser using DataLab