MizerParams: Constructors for objects of 'MizerParams' class

Description Usage Arguments Value Note See Also Examples

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

Constructor that takes the species_params data.frame and the interaction matrix

Constructor based on the species_params data.frame only with no interaction

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
MizerParams(object, interaction, ...)

## S4 method for signature '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 signature '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 signature '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

Note

The only essential argument to the MizerParams constructor is a data frame which contains the species data. The data frame is arranged species by parameter, so each column of the parameter data frame is a parameter and each row has the parameters for one of the species in the model.

There are some essential columns that must be included in the parameter data.frame and that do not have default values. Other columns do have default values, so that if they are not included in the species parameter data frame, they will be automatically added when the MizerParams object is created. See the accompanying vignette for details of these columns.

An additional constructor method which takes an integer of the number of species in the model. This is only used in internally to set up a MizerParams object with the correct dimensions. It is not recommended that this method is used by users.

See Also

project MizerSim

Examples

1
2
3

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