getenv {base}R Documentation

Get Environment Variables

Description

getenv obtains the values of the environment variables named by x.

Usage

getenv(x)

Arguments

x a character vector, or missing

Value

A vector of the same length as x, with the variable names as its names attribute. Each element holds the value of the environment variable named by the corresponding component of x (or "" if no environment variable with that name was found).

On some platforms getenv() will return a named vector giving the values of all the environment variables.

See Also

getwd for the working directory.

Examples

getenv(c("R_HOME", "R_PAPERSIZE", "R_PRINTCMD", "HOST"))

[Package Contents]