Creates a fallback that can be evaluated with resolve_fallback()
.
Usage
fallback(terminal_fallback_value, source_file = "config.yaml",
hierarchy = c("./", "~/"), key = NULL)
Arguments
- terminal_fallback_value
The value the fallback will resolve to when no other instance in the hierarchy defines the key.
- hierarchy, source_file
Define the paths to the yaml files where we look for a key to be defined. By default, it is a file called
config.yaml
in the working directory and the home directory.- key
The key, that is, the name of the argument the fallback is created for. Can be
NULL
, so the definition of the key is deferred untilresolve_fallback()
is called to avoid redundancy.