Learn R Programming

ami (version 0.1.1)

using_config: Detect whether a configuration is currently active

Description

Environment-specific configuration values can be used to alter code's behavior in different environments. The config package uses the R_CONFIG_ACTIVE environment variable to specify the active environment. If R_CONFIG_ACTIVE is not set, the "default" configuration is used.

Usage

using_config(config)

Value

A logical value

Arguments

config

Configuration name

Examples

Run this code
# See whether the default configuration is being used
using_config("default")

# See whether the "production" configuration is being used
using_config("production")

Run the code above in your browser using DataLab