Learn R Programming

mizer (version 3.0.0)

ArrayTimeBySpecies: S3 class for time x species arrays

Description

Some functions in mizer return two-dimensional arrays (time x species) holding quantities like biomass, abundance, or yield rate through time. The ArrayTimeBySpecies class wraps these arrays to provide convenient print(), summary(), plot(), and as.data.frame() methods.

Usage

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

Value

An ArrayTimeBySpecies object (inherits from matrix and array).

Arguments

x

A matrix (time x species).

value_name

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

units

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

params

A MizerParams object holding the model that created the values.

Details

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

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

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

  • params – the MizerParams object that created the values.

See Also

Examples

Run this code
# \donttest{
bio <- getBiomass(NS_sim)
is.ArrayTimeBySpecies(bio)
summary(bio)
# }

Run the code above in your browser using DataLab