set_components: Changes a model parameter

Description Usage Arguments Details Examples

View source: R/ipysd.R

Description

set_components() calls .set_components() and changes a resulting parameter in the model

Usage

1
set_components(o, vals)

Arguments

o

is the ipysd S3 object

vals

contains a list with the parameter and value to be changed

Details

As it's a generic function, this call is dispatched to set_component.isdpy

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
target <- system.file("models/vensim", "Population.mdl", package = "pysd2r")
py <- pysd_connect()
py <- read_vensim(py, target)
results <- run_model(py)
l <- list("Growth Fraction"=0.02)
set_components(py,l)
out2 <- run_model(py)

## End(Not run)

pysd2r documentation built on May 2, 2019, 3:40 p.m.