getM2Background | R Documentation |
Calculates the predation mortality \mu_p(w)
on the background spectrum
by prey size. Used by the project_therMizer
method for running size based
simulations.
getM2Background
method with pred_array
argument.
getM2Background(object, n, n_pp, pred_rate)
## S4 method for signature 'therMizerParams,matrix,numeric,array'
getM2Background(object, n,
n_pp, pred_rate)
object |
A |
n |
A matrix of species abundance (species x size). |
n_pp |
A vector of the background abundance by size. |
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 +
background, the w_full slot). The array is optional. If it is not provided
it is calculated by the |
ocean_temp |
A numeric vector of the ocean temperature by realm or a single numeric ocean_temp value which is used for all realms. |
A vector of predation mortalities by background prey size.
project_therMizer
and getM2
.
## Not run:
data(NS_species_params_gears)
data(inter)
params <- therMizerParams(NS_species_params_gears, inter)
# With constant fishing effort for all gears for 20 time steps
sim <- project_therMizer(params, t_max = 20, effort = 0.5)
# Get M2 of the background spectrum at one time step
n <- sim@n[21,,]
n_pp <- sim@n_pp[21,]
getM2Background(params,n,n_pp)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.