Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

rapsimng (version 0.4.4)

set_parameter_value: Set a parameter with a new value

Description

Set a parameter with a new value

Usage

set_parameter_value(l, parameter, value)

Value

A list with replaced value

Arguments

l

the list of apsimx file

parameter

the name of parameter with APSIM NG specification

value

the new value

Examples

Run this code
 wheat <- read_apsimx(system.file("extdata/Wheat.json", package = "rapsimng"))
 new_wheat <- set_parameter_value(wheat,
  "[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero.FixedValue",
  1)
new_wheat2 <- search_path(new_wheat,
    "[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero")
new_wheat2$node$FixedValue

new_wheat <- set_parameter_value(
    wheat,
    "[Structure].HeightModel.WaterStress.XYPairs.Y",
    "0.1,1.1")
new_wheat2 <- search_path(new_wheat,
    "[Structure].HeightModel.WaterStress.XYPairs")
new_wheat2$node$Y

Run the code above in your browser using DataLab