Sys.setenv sets environment variables (for other processes called from within R or future calls to Sys.getenv from this R process). Sys.unsetenv removes environment variables.
Sys.setenv(…)<p></p><p>Sys.unsetenv(x)</p>
| Parameter | Description |
|---|---|
… |
named arguments with values coercible to a character string. |
x |
a character vector, or an object coercible to character. |
# NOT RUN {
print(Sys.setenv(R_TEST = "testit", "A+C" = 123)) # `A+C` could also be used
Sys.getenv("R_TEST")
Sys.unsetenv("R_TEST")
Sys.unsetenv("R_TEST") # may warn and not succeed
Sys.getenv("R_TEST", unset = NA)
# }