extract_values_apsimx {apsimx}R Documentation

Extract values from a parameter path

Description

Extract initial values from a parameter path

Usage

extract_values_apsimx(file, src.dir, parm.path)

Arguments

file

file name to be run (the extension .apsimx is optional)

src.dir

directory containing the .apsimx file to be run (defaults to the current directory)

parm.path

parameter path either use inspect_apsimx or see example below

Value

a vector with extracted parameter values from an APSIM file.

Examples


## Find examples
extd.dir <- system.file("extdata", package = "apsimx")
## Extract parameter path
pp <- inspect_apsimx("Maize.apsimx", src.dir = extd.dir,
                     node = "Manager", parm = list("Fert", 1))
ppa <- paste0(pp, ".Amount")
## Extract value
extract_values_apsimx("Maize.apsimx", src.dir = extd.dir, parm.path = ppa)


[Package apsimx version 2.7.7 Index]