eval.config.merge {configr}R Documentation

Merge config parameter sets by sections.

Description

Merge config parameter sets by sections.

Usage

eval.config.merge(
  file = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"),
  sections = NULL,
  ...
)

Arguments

file

File name of configuration file to read from. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist and JSON/INI/YAML/TOML format only)

sections

Need be merged parameter sets, eg. sections=c('default', 'version'), will default to all of config sections

...

Arguments for get.config.type, eval.config.sections, eval.config

Value

A list or logical FALSE indicating that is not standard JSON/INI/YAML/TOML format file

See Also

eval.config.sections which only get all of the mainly parameter sets name in config file, read.config which only read from a config as a list, eval.config which only read one sections as config obj or a value from config file.

Examples

config.json <- system.file('extdata', 'config.json', package='configr')
config.ini <- system.file('extdata', 'config.ini', package='configr')
config.yaml <- system.file('extdata', 'config.yaml', package='configr')
config.toml <- system.file('extdata', 'config.toml', package='configr')
eval.config.merge(config.json)
eval.config.merge(config.ini)
eval.config.merge(config.yaml)
eval.config.merge(config.toml)

[Package configr version 0.3.5 Index]