extract_values_apsimx: Extract values from a parameter path

View source: R/extract_data_apsimx.R

extract_values_apsimxR 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)


apsimx documentation built on Sept. 11, 2024, 5:42 p.m.