View source: R/check_param_list.R
check_param_list | R Documentation |
Check that the parameter list (or JSON parameter file) is in the correct format, and then specified values are coherent with parameters.
check_param_list(pm, type = "string", check_paths = FALSE, correct = TRUE)
pm |
List of parameters or path of a JSON parameter file. |
type |
Type of the output (see print_message for details). |
check_paths |
Logical: if TRUE, the function checks required output paths to be provided; if FALSE (default) these checks are skipped. |
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. |
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.
License: GPL 3.0
Luigi Ranghetti, phD (2019)
L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). "sen2r": An R toolbox for automatically downloading and preprocessing Sentinel-2 satellite data. Computers & Geosciences, 139, 104473. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.cageo.2020.104473")}, URL: https://sen2r.ranghetti.info/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.