Learn R Programming

mizer (version 3.0.0)

setInitialValues: Set initial values to values from a simulation

Description

[Deprecated] This function is deprecated. Use getParams(), initialParams(), or finalParams() instead. These functions return a MizerParams object with the ecosystem state extracted from a simulation.

Usage

setInitialValues(params, sim, time_range, geometric_mean = FALSE, ...)

Value

The params object with updated initial values and initial effort.

Arguments

params

A MizerParams object in which to set the initial values

sim

A MizerSim object from which to take the values.

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

[Experimental] If TRUE then 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.

...

Additional arguments passed to the method.

Details

[Deprecated]

Examples

Run this code
# \donttest{
params <- NS_params
sim <- project(params, t_max = 20, effort = 0.5)
params <- setInitialValues(params, sim)
# }

Run the code above in your browser using DataLab