Skip to contents

Check if config has any invalid keys

Usage

cfg_keys_all_valid(
  exp_keys = NULL,
  cfg_dir = NULL,
  cfg_name = NULL,
  invalid_keys = NULL,
  cfg = NULL
)

Arguments

exp_keys

A character vector of expected config keys or NULL for the default. Default: Keys as returned by get_cfg_template_keys()

cfg_dir

A character string specifying the config directory, or NULL for the default. Default: An OS-specific path for user configuration files in the user's home directory.

cfg_name

A character string specifying the config file name, or NULL for the default. Default: 'config.yml'

invalid_keys

A character vector of keys which have been identified as invalid (could be empty).

cfg

A list of nested lists, with 'leaf' nodes specifying configuration values. Default: The template config returned by generate_cfg_template()

Value

TRUE if the keys are all valid, FALSE otherwise.

Examples

if (FALSE) { # \dontrun{
# Check keys in the default config:
cfg_keys_all_valid()
} # }