gen_varmod: Generating a var.mod type file

View source: R/gen_varmod.R

gen_varmodR Documentation

Generating a var.mod type file

Description

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()
)

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

[Deprecated] var_names is no longer supported, use var instead.

version

[Deprecated] 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.

Value

None

Examples

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)"



SticsRFiles documentation built on Sept. 12, 2024, 7:41 a.m.