Description Usage Arguments Value Author(s) Examples
Prepare ED2 parameter config file from a parameter list
1 | write_configxml(param_list, filename = NULL)
|
param_list |
Nested list of parameter values, or a |
filename |
Name of file to write to. Default ( |
In-memory xml2
document representing the file (invisibly)
Alexey Shiklomanov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | l <- list(pft = list(num = 9, sla = 22), pft = list(num = 10, sla = 30))
write_configxml(l, tempfile())
# If list has no names, assume that each element is a PFT
# So, below command is identical to above.
l2 <- list(list(num = 9, sla = 22), list(num = 10, sla = 30))
write_configxml(l2, tempfile())
# Can also set non-PFT parameters this way
l3 <- list(
pft = list(num = 9, sla = 22),
pft = list(num = 10, sla = 30),
phenology = list(retained_carbon_fraction = 0.5, theta_crit = 0.3)
)
write_configxml(l3, tempfile())
# data.frames are converted to lists with `purrr::transpose()`
df1 <- data.frame(num = c(9, 10), sla = c(22, 30))
write_configxml(df1, tempfile())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.