Description Usage Arguments Value Examples
Replace a model with new values
1 | replace_model(l, path, model)
|
l |
the list of apsimx file |
path |
If numeric, the path returned by search_path or search_node. If character, the path supported by apsimx |
model |
A new model |
The modified list with new value
1 2 3 4 5 6 7 | wheat <- read_apsimx(system.file("Wheat.json", package = "rapsimng"))
a <- search_path(wheat, '[Wheat].Phenology.ThermalTime')
a$node$Children[[1]]$X[[2]] <- 27
wheat_new <- replace_model(wheat, a$path, a$node)
b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime')
b$node$Children[[1]]$X
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.