read_config | R Documentation |
The format of the configuration file is expected to contain 6 space-separated columns representing, in order:
Name of simulated site. This is used, for example, when an output file is created.
Name of this simulation run. Used to differentiate
between different runs at the same site. Can be -
to indicate
no particular name, in which case nothing will be appended in
the resulting output file.
Specification of years to be simulated. Either a single
number or a sequence in R's :
notation, i.e. 2013:2022
to
indicate all years from 2013 to (including) 2022.
Filename (not full path) of parameter file to use. The file is assumed to be located in input_dir (confer documentation for that parameter).
Filename (not full path) of weather file. See also param_file.
Filename (not full path) of management file.
See also param_file. Can be set to high
, middle
, low
or
-
if no management data is to be used and the autocut
routine shall be employed to simulate cutting events.
Rows starting with a #
are skipped.
read_config(config_file, input_dir = NULL)
config_file |
Path to the configuration file to be read. |
input_dir |
Path to directory where input files are located. Defaults
to |
A list of ModvegeEnvironment instances corresponding to the configurations in the order they appear in config_file.
# First, we set up the expected directory structure in a temporary place
tmp = file.path(tempdir(), "test-read_config")
dir.create(tmp)
# We need `force = TRUE` here in order to make the example work in
# non-interactive settings.
setup_directory(root = tmp, include_examples = TRUE, force = TRUE)
# Now we can test `read_config`.
read_config(file.path(tmp, "example_config.txt"),
input_dir = file.path(tmp, "input"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.