set_init: Set initial state

set_initR Documentation

Set initial state

Description

The initial state represents the starting values of a scenario's state variables when starting a simulation. A scenario's default initial state may be insufficient to get sensible results.

Usage

set_init(x, init)

## S4 method for signature 'vector'
set_init(x, init)

## S4 method for signature 'EffectScenario'
set_init(x, init)

Arguments

x

vector of EffectScenario objects

init

named numeric vector

Details

In theory, a scenarios's state variables can be renamed by modifying the names of the initial state vector. However, this is strongly discouraged as this will affect other routines such as effect() and epx() and may render results useless.

Value

modified EffectScenario objects

Examples

# Set initial biomass to 1.0
metsulfuron %>% set_init(c(BM=1.0)) %>% simulate()

cvasi documentation built on Sept. 23, 2024, 9:08 a.m.