Skip to contents

Retrieves a value from the app package's configuration file, `config.yml`.

Usage

get_app_config(
  value,
  config = Sys.getenv("APP_CONFIG_ACTIVE", Sys.getenv("R_CONFIG_ACTIVE", "default")),
  use_parent = TRUE,
  file = app_sys("config.yml")
)

Arguments

value

(Required) Value to retrieve from the config file.

config

(Optional) Configuration environment to use. Defaults to the `APP_CONFIG_ACTIVE`'s environment variable, if available, and if not, uses `R_CONFIG_ACTIVE`'s environment variable. Finally if still unset, defaults to `default`.

use_parent

(Optional) Logical, scan the parent directory for config file. Defaults to `TRUE`.

file

(Optional) Character path to the location of the config file. Defaults to the `config.yml` file in the app package's root installation directory via `app_sys("config.yml")`.

Value

The value from the config file.