check_param_list: Check a parameter list

Description Usage Arguments Value Note Author(s)

View source: R/fct_param.R

Description

Check that the parameter list (or JSON parameter file) is in the correct format, and then speficied values are coherent with parameters.

Usage

1
check_param_list(pm, type = "string", correct = TRUE)

Arguments

pm

List of parameters or path of a JSON parameter file.

type

Type of the output (see [print_message] for details).

correct

Logical: if TRUE (default), the function corrects some incoherences (e.g. timewindow of length 1 is transformed in length 2) and returns the corrected list as output; if false, only checking is performed, and the output is NULL if no errors occur.

Value

In case of errors, depending on 'type' argument, output can be a vector of errors (if ‘type = ’string''), the first error occurred (if ‘type = ’error'') or a set of warnings (if ‘type = ’warning''). If no errors occur, output is the corrected parameter list if 'correct = TRUE' or NULL otherwise.

Note

License: GPL 3.0

Author(s)

Pascal Obstetar (2020) pascal.obstetar@onf.fr


pobsteta/shinyCNES documentation built on April 28, 2021, 9:43 a.m.