Sys.putenv {base} | R Documentation

## Set Environment Variables

### Description

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

### Usage

    Sys.putenv(...)

### Arguments

`...` | arguments in `name=value` form, with `value` coercible to a character string.

### Details

Non-standard R names must be quoted: see the Examples section.

### Value

A logical vector of the same length as `x`, with elements being true if setting the corresponding variable succeeded.

### Note

Not all systems need support `Sys.putenv`.

### See Also

`Sys.getenv`, `setwd` for the working directory.

### Examples

    print(Sys.putenv("R_TEST"="testit", ABC=123))
    Sys.getenv("R_TEST")

[Package base version 2.0.1 Index]