Description Usage Arguments Value Examples
System Environment Variables
1 | Sys.getenv_value(name, raw = FALSE)
|
name |
variable name as a character string. |
raw |
logical that indicates if one should return the raw value or
the convertion of any false value to |
the value of the environment variable as a character string or
NA
is the variable is not defined at all.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # undefined returns FALSE
Sys.getenv_value('TOTO')
# raw undefined returns NA
Sys.getenv_value('TOTO', raw = TRUE)
Sys.setenv(TOTO='bla')
Sys.getenv_value('TOTO')
# anything false-like returns FALSE
Sys.setenv(TOTO='false'); Sys.getenv_value('TOTO')
Sys.setenv(TOTO='0'); Sys.getenv_value('TOTO')
# cleanup
Sys.unsetenv('TOTO')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.