fallback: Create a fallback

View source: R/base.R

fallbackR Documentation

Create a fallback

Description

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 until resolve_fallback() is called to avoid redundancy.

Examples

fallback(TRUE)

lorenzwalthert/fallback documentation built on April 19, 2022, 1:51 p.m.