Takes the final values from a simulation in a MizerSim object and stores them as initial values in a MizerParams object.
setInitialValues(params, sim)
params | A |
---|---|
sim | A |
The params
object with updated initial values and initial effort,
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)
.
Other functions for setting parameters:
gear_params()
,
resource_params()
,
setExtMort()
,
setFishing()
,
setInteraction()
,
setMaxIntakeRate()
,
setMetabolicRate()
,
setParams()
,
setPredKernel()
,
setReproduction()
,
setResource()
,
setSearchVolume()
,
species_params()
if (FALSE) { params <- NS_params sim <- project(params, t_max = 20, effort = 0.5) params <- setInitialValues(params, sim) }