gen_obs {SticsRFiles}R Documentation

Generating observation data files from a data.frame

Description

Generating observation data files from a data.frame

Usage

gen_obs(
  df,
  out_dir,
  usms_list = NULL,
  obs_table = lifecycle::deprecated(),
  out_path = lifecycle::deprecated()
)

Arguments

df

A data frame containing the values of the observations to use (see Details).

out_dir

Path of the directory where to generate the file(s).

usms_list

An optional list of usms names to be used for selecting which files to generate from the obs_table

obs_table

[Deprecated] obs_table is no longer supported, use df instead.

out_path

[Deprecated] out_path is no longer supported, use out_dir instead.

Details

df is a data.frame with the following format:

usm_name ian mo jo jul densite lai(n) masec(n) azomes
USM_2017_T1_CI 2017 9 6 249 NA NA 0.31 27.07395
USM_2017_T1_CI 2017 9 20 263 NA NA 0.60 27.90000
USM_2018_T1 2017 10 20 293 NA 0.1 NA NA
USM_2018_T1 2018 5 15 482 NA 1.2 NA NA

@seealso get_var_info for getting variable right syntax or searching a variable name.

Value

A return logical status indicating if any error when writing files (FALSE), TRUE when no errors.

Examples

xl_path <- download_usm_xl(file = "inputs_stics_example.xlsx")
obs_df <- read_params_table(file = xl_path, sheet_name = "Obs")
gen_obs(df = obs_df, out_dir = "/path/to/dest/dir")


[Package SticsRFiles version 1.3.0 Index]