Generating observation data files from a data.frame
gen_obs(
df,
out_dir,
usms_list = NULL,
obs_table = lifecycle::deprecated(),
out_path = lifecycle::deprecated()
)
A return logical status indicating if any error when writing files (FALSE), TRUE when no errors.
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 |
usm_name
column contains usms names which are used as output .obs
files names
ian
, mo
, jo
and jul
are mandatory
(year, month, day and julian date)
Other columns one per variable contain observations values or NA
@seealso get_var_info
for getting variable right syntax or
searching a variable name.
xl_path <- download_usm_xl(file = "inputs_stics_example.xlsx")
#> Warning: inputs_stics_example.xlsx already exists in /var/folders/1y/56hdyx6x0_jb18k7b4ys9b6w0000gn/T//Rtmp6TMon6
#> Consider to set overwrite = TRUE to overwrite (it | them )
obs_df <- read_params_table(file = xl_path, sheet_name = "Obs")
gen_obs(df = obs_df, out_dir = "/path/to/dest/dir")
#> Warning: The directory does not exist /path/to/dest/dir