options.validate | R Documentation |
This function reads a YAML template and an options file, flattens both structures, and then checks that:
Every option defined in the template is present in the options file.
The value for each option is of the correct type.
(Optionally) It warns about extra options in the file that are not defined in the template.
options.validate(
options_file_name = NULL,
options_dir = NULL,
should_flag_redundant = FALSE,
template_path = NULL,
failure_action = "abort_verbose",
verbose = TRUE
)
options_file_name |
[character] Name of the user options file to validate, including the suffix. |
options_dir |
[character, optional] Full path to the folder that contains user options files. If not provided, the default folder is chosen. Defaults to |
should_flag_redundant |
[logical, optional] If TRUE, warn the user about any extraneous options (i.e., options not defined in the options template, such as custom options that the user might have added). Defaults to FALSE. |
template_path |
[character, optional] Full path to the options template file. Defaults to |
failure_action |
[character] Action to take if validation fails. Can be one of: 'abort_verbose', 'abort_quiet', 'return_errors_verbose', 'return_errors_quiet'. Defaults to 'abort_verbose'. |
verbose |
[logical, optional] If TRUE, print additional information about the validation process. Defaults to TRUE.
|
For each problem found (missing option or type mismatch), an error message is printed.
[list] The validation errors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.