set_init {cvasi}R 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()

[Package cvasi version 1.1.3 Index]