View source: R/ArrayResourceBySize-class.R
| ArrayResourceBySize | R Documentation |
Several functions in mizer return a vector over the full size grid holding
a resource-related quantity such as the resource number density, the
resource mortality, the intrinsic resource birth rate or carrying capacity.
The
ArrayResourceBySize class wraps these vectors to provide convenient
print(), summary(), plot(), and as.data.frame() methods.
ArrayResourceBySize(
x,
value_name = NULL,
units = NULL,
type = NULL,
params = NULL
)
is.ArrayResourceBySize(x)
x |
A numeric vector over the full size grid. For
|
value_name |
A string giving the human-readable name for the value. |
units |
A string giving the units (e.g. "1/year"). |
type |
The kind of quantity the values are, see |
params |
A |
An ArrayResourceBySize object behaves just like a regular numeric vector
for arithmetic operations and subsetting. It carries three lightweight
attributes:
value_name – a human-readable name for the value
(e.g. "Resource mortality").
units – the units of the value (e.g. "1/year").
params – the MizerParams object that the value was computed from.
An ArrayResourceBySize object (inherits from numeric).
is.ArrayResourceBySize() returns TRUE if x is an
ArrayResourceBySize object, FALSE otherwise.
print(), summary(), as.data.frame(), plot(), plot2(),
plotRelative(), addPlot()
mort <- getResourceMort(NS_params)
is.ArrayResourceBySize(mort)
summary(mort)
plot(mort)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.