Description Usage Arguments Value Examples
This function assumes the file is apsimx format. A new Replacements node is added if it is not exist. The existing cultivar parameters are updated. New cultivar is created.
1 | update_cultivar(l, df)
|
l |
The list of apsimx file |
df |
A data frame for new parameters with three columns, i.e. name, parameter and value. |
The modified apsimx file
1 2 3 4 5 6 7 8 9 10 11 | wheat <- read_apsimx(system.file("wheat.apsimx", package = "rapsimng"))
# Update cultivars
df <- data.frame(name = rep("Hartog", 3),
parameter = c("[Phenology].MinimumLeafNumber.FixedValue",
"[Phenology].VrnSensitivity.FixedValue",
"[Phenology].PpSensitivity.FixedValue"),
value = c(9, 7, 3))
wheat_cultivar <- update_cultivar(wheat, df)
hartog <- search_path(wheat_cultivar, "[Replacements].Hartog")
hartog$path
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.