Learn R Programming

mizer (version 1.0.1)

MizerParams: Constructors for objects of MizerParams class

Description

Constructor method for the '>MizerParams class. Provides the simplest way of making a MizerParams object to be used in a simulation.

Only really used to make MizerParams of the right size and shouldn't be used by user

Usage

MizerParams(object, interaction, ...)

# S4 method for numeric,missing MizerParams(object, min_w = 0.001, max_w = 1000, no_w = 100, min_w_pp = 1e-10, no_w_pp = NA, species_names = 1:object, gear_names = species_names)

# S4 method for data.frame,matrix MizerParams(object, interaction, n = 2/3, p = 0.7, q = 0.8, r_pp = 10, kappa = 1e+11, lambda = (2 + q - n), w_pp_cutoff = 10, max_w = max(object$w_inf) * 1.1, f0 = 0.6, z0pre = 0.6, z0exp = n - 1, ...)

# S4 method for data.frame,missing MizerParams(object, interaction, ...)

Arguments

object

A data frame of species specific parameter values (see notes below).

interaction

Optional argument to specify the interaction matrix of the species (predator by prey). If missing a default interaction is used where all interactions between species are set to 1. Note that any dimnames of the interaction matrix argument are ignored by the constructor. The dimnames of the interaction matrix in the returned MizerParams object are taken from the species names in the species_params slot. This means that the order of the columns and rows of the interaction matrix argument should be the same as the species name in the species_params slot.

...

Additional arguments.

min_w

The smallest size of the community spectrum.

max_w

The largest size of the community spectrum. Default value is the largest w_inf in the community x 1.1.

no_w

The number of size bins in the community spectrum.

min_w_pp

The smallest size of the background spectrum.

no_w_pp

Obsolete argument that is no longer used because the number of plankton size bins is determined because all size bins have to be logarithmically equally spaced.

species_names

Names of the species. Generally not needed as normally taken from the object data.frame.

gear_names

Names of the gears that catch each species. Generally not needed as normally taken from the object data.frame. Default is species_names.

n

Scaling of the intake. Default value is 2/3.

p

Scaling of the standard metabolism. Default value is 0.7.

q

Exponent of the search volume. Default value is 0.8.

r_pp

Growth rate of the primary productivity. Default value is 10.

kappa

Carrying capacity of the resource spectrum. Default value is 1e11.

lambda

Exponent of the resource spectrum. Default value is (2+q-n).

w_pp_cutoff

The cut off size of the background spectrum. Default value is 10.

f0

Average feeding level. Used to calculated h and gamma if those are not columns in the species data frame. Also requires k_vb (the von Bertalanffy K parameter) to be a column in the species data frame. If h and gamma are supplied then this argument is ignored. Default is 0.6..

z0pre

If z0, the mortality from other sources, is not a column in the species data frame, it is calculated as z0pre * w_inf ^ z0exp. Default value is 0.6.

z0exp

If z0, the mortality from other sources, is not a column in the species data frame, it is calculated as z0pre * w_inf ^ z0exp. Default value is n-1.

Value

An object of type MizerParams

See Also

project '>MizerSim

Examples

Run this code
# NOT RUN {
data(NS_species_params_gears)
data(inter)
params <- MizerParams(NS_species_params_gears, inter)
# }

Run the code above in your browser using DataLab