Skip to contents

Identifies keys in the config which do not exist in exp_keys.

Usage

get_invalid_cfg_keys(
  exp_keys = NULL,
  cfg_dir = NULL,
  cfg_name = 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'

cfg

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

Value

A character vector containing any invalid keys found in the config.

Examples

get_invalid_cfg_keys()
#> Warning: cannot open file '/home/runner/.config/R-dimex/config.yml': No such file or directory
#> Error in file(file, "rt", encoding = fileEncoding): cannot open the connection