Learn R Programming

mizer (version 3.0.0)

ArraySpeciesBySize: S3 class for species x size rate arrays

Description

Many functions in mizer return two-dimensional arrays (species x size) holding rates like encounter rate, feeding level, growth rate, mortality etc. The ArraySpeciesBySize class wraps these arrays to provide convenient print(), summary(), plot(), and as.data.frame() methods.

Usage

ArraySpeciesBySize(x, value_name = NULL, units = NULL, params = NULL)

Value

An ArraySpeciesBySize object (inherits from matrix and array).

Arguments

x

A matrix (species x size).

value_name

A string giving the human-readable name for the value.

units

A string giving the units (e.g. "g/year", "1/year").

params

A MizerParams object. Used for species colours, linetypes, and size ranges in the plot() method.

Details

An ArraySpeciesBySize object behaves just like a regular matrix for arithmetic operations and subsetting. It carries two lightweight attributes:

  • value_name – a human-readable name for the value (e.g. "Encounter rate").

  • units – the units of the rate (e.g. "g/year").

See Also

Examples

Run this code
# \donttest{
enc <- getEncounter(NS_params)
is.ArraySpeciesBySize(enc)
summary(enc)
# }

Run the code above in your browser using DataLab