Learn R Programming

mizer (version 1.0.1)

getPhiPrey: Get available energy

Description

Calculates the amount \(E_{a,i}(w)\) of food exposed to each predator as a function of predator size.

Usage

getPhiPrey(object, n, n_pp, ...)

# S4 method for MizerParams,matrix,numeric getPhiPrey(object, n, n_pp, ...)

Arguments

object

An '>MizerParams object

n

A matrix of species abundances (species x size)

n_pp

A vector of the background abundance by size

...

Other arguments (currently unused)

Value

A two dimensional array (predator species x predator size)

Details

This method is used by the project method for performing simulations.

See Also

project

Examples

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

Run the code above in your browser using DataLab