Learn R Programming

mizer (version 2.0.0)

setInitialValues: Set initial values to final values of a simulation

Description

Takes the final values from a simulation in a MizerSim object and stores them as initial values in a MizerParams object.

Usage

setInitialValues(params, sim)

Arguments

params

A MizerParams() object

sim

A MizerSim object.

Value

The params object with updated initial values, taken from the values at the final time of the simulation in sim. Because of the way the R language works, setInitialValues() does not make the changes to the params object that you pass to it but instead returns a new params object. So to affect the change you call the function in the form params <- setInitialValues(params, sim).

See Also

Other functions for setting parameters: setExtMort(), setFishing(), setInteraction(), setMaxIntakeRate(), setMetabolicRate(), setPredKernel(), setReproduction(), setResource(), setSearchVolume(), species_params()

Examples

Run this code
# NOT RUN {
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