Description Usage Arguments Value Examples
Get a variable from, in order of priority, environment variable, .env or settings.ini, or default values. Data type can be cast to boolean or integer.
1 2 3 4 5 6 7 |
config |
an object returned by the |
var_name |
the variable of interest |
path |
the path from where config files are searched for. If NULL,the current directory will be considered as default. |
default |
a default value |
cast |
Either a function or a type of cast. Currently implemented options are 'integer', 'boolean' or 'float'. |
The value associated to the config variable. The type depends on the cast argument. Default is string.
1 2 | config <- get_config()
get_var(config, "test", default = "yes", cast = "bool")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.