getFeedingLevel: Get feeding level

Description Usage Arguments Note See Also Examples

Description

Calculates the feeding level f_i(w) as a by predator size based on food availability, search volume and maximum intake. The feeding level is the proportion of the encountered food that is actually consumed.This method is used by the project method for performing simulations.

getFeedingLevel method for a MizerParams object with already calculated phi_prey matrix.

getFeedingLevel method for a MizerParams object without the phi_prey matrix argument.

getFeedingLevel method for a MizerSim object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
getFeedingLevel(object, n, n_pp, phi_prey, ...)

## S4 method for signature 'MizerParams,matrix,numeric,matrix'
getFeedingLevel(object, n, n_pp,
  phi_prey, ...)

## S4 method for signature 'MizerParams,matrix,numeric,missing'
getFeedingLevel(object, n, n_pp,
  phi_prey, ...)

## S4 method for signature 'MizerSim,missing,missing,missing'
getFeedingLevel(object,
  time_range = dimnames(object@n)$time, drop = FALSE, ...)

Arguments

object

A MizerParams or MizerSim object

n

A matrix of species abundance (species x size). Only used if object argument is of type MizerParams.

n_pp

A vector of the background abundance by size. Only used if object argument is of type MizerParams.

phi_prey

The PhiPrey matrix (optional) of dimension no. species x no. size bins. If not passed in, it is calculated internally using the getPhiPrey method. Only used if object argument is of type MizerParams.

...

Other arguments (currently unused).

time_range

Subset the returned fishing mortalities by time. The time range is either a vector of values, a vector of min and max time, or a single value. Default is the whole time range. Only used if the object argument is of type MizerSim.

drop

should extra dimensions of length 1 in the output be dropped, simplifying the output. Defaults to TRUE.

Note

If a MizerParams object is passed in, the method returns a two dimensional array (predator species x predator size) based on the abundances also passed in.

If a MizerSim object is passed in, the method returns a three dimensional array (time step x predator species x predator size) with the feeding level calculated at every time step in the simulation.

See Also

getPhiPrey

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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)
# Get the feeding level at one time step
n <- sim@n[21,,]
n_pp <- sim@n_pp[21,]
fl <- getFeedingLevel(params,n,n_pp)
# Get the feeding level at all saved time steps
fl <- getFeedingLevel(sim)
# Get the feeding level for time 15 - 20
fl <- getFeedingLevel(sim, time_range = c(15,20))

## End(Not run)

drfinlayscott/mizer documentation built on May 18, 2018, 9:20 a.m.