Description Usage Arguments Value See Also Examples
Read from the currently active configuration (JSON/INI/YAML/TOML be supported), 'retreiving either a single named value or all values as a config obj which have 'config', 'configtype', 'file' 'property.
1 2 3 4 5 6 | eval.config(
value = NULL,
config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
file = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"),
...
)
|
value |
Name of value (NULL to read all values) |
config |
Name of configuration to read from. Default is the value of 'the R_CONFIG_ACTIVE environment variable (Set to 'default' if the variable does not exist). |
file |
File name of configuration file to read from. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist and JSON/INI/YAML/TOML format only) |
... |
Arguments for |
Either a single value or all values as a list or logical FALSE indicating that is not standard JSON/INI/YAML/TOML format file
read.config
read config by this
eval.config.merge
which can merge multiple parameter sets by sections
1 2 3 4 5 6 | config.json <- system.file('extdata', 'config.json', package='configr')
config <- eval.config(file=config.json)
config.extra.parsed.1 <- eval.config(file = config.json, extra.list = list(debug = 'TRUE'))
other.config <- system.file('extdata', 'config.other.yaml', package='configr')
config.extra.parsed.2 <- eval.config(file = config.json, extra.list = list(debug = 'TRUE'),
other.config = other.config)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.