A MizerParams object describes the state of the ecosystem: its species
parameters, size grid, rate functions, and the current abundances stored in
the initial_n, initial_n_pp, initial_n_other, and initial_effort
slots. getParams() extracts that state from a MizerSim object, averaged
over a chosen time range (or at a single time point).
Arguments
- sim
A
MizerSimobject.- time_range
The time range to average the abundances over. Can be a vector of values, a vector of min and max time, or a single value. Only the range of times is relevant, i.e., all times between the smallest and largest will be selected. Default is the final time step.
- geometric_mean
If
TRUE, the average of the abundances over the time range is a geometric mean instead of the default arithmetic mean. This does not affect the average of the effort or of other components, which is always arithmetic.
Value
A MizerParams object with initial_n, initial_n_pp,
initial_n_other, and initial_effort set to the (averaged) values from
the simulation.
Details
When no time_range is given, the state at the final time step is returned.
Use initialParams() or finalParams() as convenient shorthand for the
state at the initial and final time respectively.
The abundances set in the returned MizerParams object are averages over the
selected time range. By default this is an arithmetic mean; set
geometric_mean = TRUE to use a geometric mean instead (this does not affect
the effort or other components, which are always averaged arithmetically).
