read_config | R Documentation |
Reads a configuration (config) file (compilable csjon/js file or json file) and turns it into a nested list object.
read_config(filename, from_restart = FALSE, macro = "")
filename |
Character string representing path (if different from current working directory) and filename. |
from_restart |
Logical defining whether config files should be read as
from_restart (transient run) or without (spinup run). Defaults to |
macro |
Optional character string to pass one or several macros to the pre-compiler, e.g. ("-DFROM_RESTART"). Used only if file is not pre-compiled (no json). |
A nested list object representing the LPJmL configuration read from
filename
.
## Not run:
config <- read_config(filename = "config_spinup.json")
config[["version"]]
# [1] "5.3"
config[["pftpar"]][[1]][["name"]]
# [1] "tropical broadleaved evergreen tree"
config[["input"]][["coord"]][["name"]]
# [1] "input_VERSION2/grid.bin"
# visualize configuration as tree view
View(config)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.