Generating a daily variable list file from variables names
Usage
gen_varmod(
workspace,
var,
append = FALSE,
file_name = "var.mod",
stics_version = "latest",
force = FALSE,
var_names = lifecycle::deprecated(),
version = lifecycle::deprecated()
)
Value
None
Arguments
workspace
Path of the directory containing the STICS var.mod file
to modify
var
vector of variables names (see details)
append
if TRUE, var data are appended to file_name
file_name
file name to generate
(without path, default value: "var.mod")
stics_version
Name of the STICS version
(used to check variable names)
force
Force variables writing even if they are not a
STICS variable (default: FALSE).
var_names
var_names is no
longer supported, use var instead.
version
version is no
longer supported, use stics_version instead.
Details
Variable names can be found using get_var_info(). They are
checked before writing. If any variable name does not exist,
it will not be written by default, but the function will still write
the variables that exist. force= TRUE may however be used to write
variables that do not exist.
gen_varmod(tempdir(), c("lai(n)", "hauteur"))
# Add a variable to the others:gen_varmod(tempdir(), "masec(n)", append = TRUE)
# NB: var.mod will have "lai(n)","hauteur" and "masec(n)"