get: Read configuration values.

Description Usage Arguments Details Value See Also

View source: R/get.R

Description

Read from the currently active configuration, retrieving either a single named value or all values as a list.

Usage

1
2
3
4
5
6
get(
  value = NULL,
  config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
  file = Sys.getenv("R_CONFIG_FILE", "config.yml"),
  use_parent = TRUE
)

Arguments

value

Name of value (NULL to read all values)

config

Name of configuration to read from. Defaults to the value of the R_CONFIG_ACTIVE environment variable ("default" if the variable does not exist).

file

Configuration file to read from (defaults to "config.yml"). If the file isn't found at the location specified then parent directories are searched for a file of the same name.

use_parent

TRUE to scan parent directories for configuration files if the specified config file isn't found.

Details

For additional details see the package website at https://github.com/rstudio/config.

Value

The requested configuration value (or all values as a list of NULL is passed for value).

A list, or vector, corresponding to the contents of the config file.

See Also

is_active(), merge()


config documentation built on Dec. 17, 2020, 5:11 p.m.