Some functions in mizer return three-dimensional arrays (time x species x
size) holding quantities like fishing mortality, feeding level, or predation
mortality through time. The ArrayTimeBySpeciesBySize class wraps these
arrays to provide convenient print(), summary(), plot(),
animate(), and as.data.frame() methods.
ArrayTimeBySpeciesBySize(
x,
value_name = NULL,
units = NULL,
params = NULL,
representation = c("point", "average")
)is.ArrayTimeBySpeciesBySize(x)
An ArrayTimeBySpeciesBySize object (inherits from array).
is.ArrayTimeBySpeciesBySize() returns TRUE if x is an
ArrayTimeBySpeciesBySize object, FALSE otherwise.
A 3D array (time x species x size). For
is.ArrayTimeBySpeciesBySize(), any object to test.
A string giving the human-readable name for the value.
A string giving the units (e.g. "1/year").
A MizerParams object. Used for species colours, linetypes,
and size ranges in the plot() and animateSpectra() methods.
Either "point" (the default) for a quantity sampled
at the grid nodes, or "average" for a finite-volume bin average, which is
then drawn at the geometric bin centre when the model uses second-order
bin-averaging (second_order_w[["bin_average"]]). See
ArraySpeciesBySize().
An ArrayTimeBySpeciesBySize object behaves just like a regular array for
arithmetic operations and subsetting. It carries these lightweight attributes:
value_name – a human-readable name for the value
(e.g. "Fishing mortality").
units – the units of the value (e.g. "1/year").
params – the MizerParams object that the value was computed from.
print(), summary(), as.data.frame(), plot(),
animateSpectra()
# \donttest{
fmort <- getFMort(NS_sim)
is.ArrayTimeBySpeciesBySize(fmort)
summary(fmort)
plot(fmort, time = 2007)
# }
Run the code above in your browser using DataLab