Learn R Programming

mizer (version 2.5.3)

setExtEncounter: Set external encounter rate

Description

Set external encounter rate

Usage

setExtEncounter(params, ext_encounter = NULL, ...)

getExtEncounter(params)

ext_encounter(params)

ext_encounter(params) <- value

Value

setExtEncounter(): A MizerParams object with updated external encounter rate.

getExtEncounter() or equivalently ext_encounter(): An array (species x size) with the external encounter rate.

Arguments

params

MizerParams

ext_encounter

Optional. An array (species x size) holding the external encounter rate. If not supplied, the external encounter rate is left unchanged. Initially is is set to 0.

...

Unused

value

ext_encounter

Setting external encounter rate

The external encounter rate is the rate at which a predator encounters food that is not explicitly modelled. It is a rate with units mass/year.

The ext_encounter argument allows you to specify an external encounter rate that depends on species and body size. You can see an example of this in the Examples section of the help page for setExtEncounter().

See Also

Other functions for setting parameters: gear_params(), setExtMort(), setFishing(), setInitialValues(), setInteraction(), setMaxIntakeRate(), setMetabolicRate(), setParams(), setPredKernel(), setReproduction(), setSearchVolume(), species_params()

Examples

Run this code
params <- newMultispeciesParams(NS_species_params)

#### Setting allometric encounter rate #######################

# Set coefficient for each species. Here we choose 0.1 for each species
encounter_pre <- rep(0.1, nrow(species_params(params)))

# Multiply by power of size with exponent, here chosen to be 3/4
# The outer() function makes it an array species x size
allo_encounter <- outer(encounter_pre, w(params)^(3/4))

# Change the external encounter rate in the params object
ext_encounter(params) <- allo_encounter

Run the code above in your browser using DataLab