get_sys_env | R Documentation |
Read an environment variable and if needed, assign a default value.
get_sys_env(
var,
default = NULL,
type = c("character", "double", "integer", "logical"),
verbose = getOption("scdrake_verbose")
)
var |
A character scalar: name of environment variable. |
default |
A default value (different from |
type |
A character scalar: to which R type will be the variable coerced. |
verbose |
A logical scalar: if |
A character scalar if the environment variable is set, default
if not, or empty character scalar when
default = NULL
and the variable is unset.
get_sys_env("PATH")
get_sys_env("NON_EXISTING")
get_sys_env("NON_EXISTING", default = "default_value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.