powered by
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.
A data frame containing the values of the observations to use (see Details).
Path of the directory where to generate the file(s).
An optional list of usms names to be used for selecting which files to generate from the obs_table
obs_table is no longer supported, use df instead.
obs_table
df
out_path is no longer supported, use out_dir instead.
out_path
out_dir
df is a data.frame with the following format:
data.frame
usm_name column contains usms names which are used as output .obs files names
usm_name
ian, mo, jo and jul are mandatory (year, month, day and julian date)
ian
mo
jo
jul
Other columns one per variable contain observations values or NA
@seealso get_var_info for getting variable right syntax or searching a variable name.
get_var_info
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")
Run the code above in your browser using DataLab