get_param_xml {SticsRFiles} | R Documentation |
Getting parameter values from xml files
Description
Extracting parameter values for a list of xml files and parameters
Usage
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(),
...
)
Arguments
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 |
Value
A list of parameter values for each xml_file (a list of list)
Examples
# 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"))
[Package SticsRFiles version 1.4.0 Index]