Learn R Programming

rconf (version 0.1.2)

merge_configs: Merge Configurations

Description

Recursively merges two configuration lists, with values in the override replacing those in the base configuration.

Usage

merge_configs(base_cfg, override_cfg)

Value

A merged configuration list.

Arguments

base_cfg

A list containing the base configuration.

override_cfg

A list containing override values.

Examples

Run this code

base_cfg <- get_config(system.file("extdata",
"config.yml",package = "rconf"), config_name = "default")
dev_cfg <- get_config(system.file("extdata",
"config.yml", package = "rconf"), config_name = "development")
combined_cfg <- merge_configs(base_cfg, dev_cfg)
print(combined_cfg)

Run the code above in your browser using DataLab