View source: R/get_param_xml.R
get_param_xml | R Documentation |
Extracting parameter values for a list of xml files and parameters
get_param_xml(
file,
param = NULL,
select = NULL,
select_value = NULL,
value_id = NULL,
xml_file = lifecycle::deprecated(),
param_name = lifecycle::deprecated(),
value = lifecycle::deprecated(),
...
)
file |
Vector of the xml file paths from which parameters values must be extracted |
param |
Vector of parameter names. Optional, if not provided, the function returns information for all parameters. |
select |
node name or attribute name to use for selection (optional, default to no selection) |
select_value |
Vector of values used for select (see examples). Optional, should be provided only if select is provided. |
value_id |
Vector of ids of the parameters values to be retrieved from the parameter values vector |
xml_file |
|
param_name |
|
value |
|
... |
Pass further arguments to |
A list of parameter values for each xml_file (a list of list)
# Soil file
file <- file.path(get_examples_path(file_type = "xml"), "sols.xml")
# For all soils
get_param_xml(file)
get_param_xml(file, c("argi", "norg"))
# With soil selection
# scalar parameters per soil
get_param_xml(file, c("argi", "norg"),
select = "sol", select_value = c("solcanne", "solbanane")
)
# Crop management file
file <- file.path(get_examples_path(file_type = "xml"), "file_tec.xml")
# Getting parameters for irrigation (date and quantity)
get_param_xml(file, c("julapI_or_sum_upvt", "amount"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.