Learn R Programming

this.path (version 2.5.0)

Sys.putenv: Set Environment Variables

Description

Sys.putenv() sets environment variables (for other processes called from within R or future calls to Sys.getenv() from this R process).

Usage

Sys.putenv(x)

Value

A logical vector, with elements being true if setting the corresponding variable succeeded.

Arguments

x

a character vector, or an object coercible to character. Strings must be of the form "name=value".

See Also

Examples

Run this code
Sys.putenv(c("R_TEST=testit", "A+C=123"))
Sys.getenv("R_TEST")
Sys.unsetenv("R_TEST")  ## under Unix-alikes may warn and not succeed
Sys.getenv("R_TEST", unset = NA)

Run the code above in your browser using DataLab