This function merges two configuration lists: a current configuration and a new configuration.
It will return a merged configuration, preferring values from the current configuration when they exist and are not NA.
Usage
merge_configs(current_config, new_config)
Arguments
- current_config
A list representing the current configuration.
- new_config
A list representing the new configuration.
Value
A merged list containing elements from both configurations.
Examples
if (FALSE) { # \dontrun{
current <- list(version = "1.0.0", key = "old_value")
new <- list(version = "1.1.0", key = NA, new_key = "new_value")
merged <- merge_configs(current, new)
print(merged)
} # }