Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_config

Query a configuration parameter key


Description

Query a configuration parameter key, and return the value set in the calling package(s).

Usage

get_config(key, fallback = NULL)

Arguments

key

The name of the parameter to query.

fallback

Fallback if the parameter id not found anywhere.

Details

This function is meant to be called from the package whose behavior depends on it. It searches for the given configuration key, and if it exists, it checks which package(s) it was called from and returns the configuration setting for that package.

If the key is not set in any calling package, but it is set in the global environment (i.e. at the R prompt), then it returns that setting.

If the key is not set anywhere, then it returns NULL.

Value

The value of the parameter, or the fallback value if not found.


pkgconfig

Private Configuration for 'R' Packages

v2.0.3
MIT + file LICENSE
Authors
Gábor Csárdi
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.