EnvVar {base}R Documentation

Environment Variables

Description

Details of some of the environment variables which affect an R session.

Details

It is impossible to list all the environment variables which can affect an R session: some affect the OS system functions which R uses, and others will affect add-on packages. But here are notes on some of the more important ones.

HOME:
The user's ‘home’ directory.
LANGUAGE:
Optional. The language(s) to be used for message translations.
LC_ALL:
(etc) Optional. Use to set various aspects of the locale – see Sys.getlocale.
R_BATCH:
Optional – set in a batch session.
R_COMPLETION:
Optional. If set to FALSE, comand-line completion is not used. (Not used by Mac OS GUI.)
R_DEFAULT_PACKAGES:
A comma-separated list of packages which are to be loaded in every session. See options.
R_ENVIRON:
Optional. The path to the site environment file: see Startup.
R_GSCMD:
Optional. The path to GhostScript.
R_HISTFILE:
Optional. The path of the history file: see Startup.
R_HISTSIZE:
Optional. The maximum size of the history file, in lines.
R_HOME:
The top-level directory of the R installation. Set by R.
R_LIBS:
Optional. Setting for .libPaths.
R_LIBS_SITE:
Optional. Setting for .libPaths.
R_LIBS_USER:
Optional. Setting for .libPaths.
R_PAPERSIZE:
Optional. The default papersize, e.g. for pdf and postscript.
R_PROFILE:
Optional. The path to the site profile file: see Startup.
R_RD4DVI:
Options for latex processing of Rd files.
R_RD4PDF:
Options for pdflatex processing of Rd files.
TMPDIR, TMP, TEMP:
Consulted (in that order) when setting the temporary directory. See tempdir.
TZ:
Optional. The current timezone. See as.POSIXlt for the system-specific formats.
no_proxy, http_proxy, ftp_proxy:
(and more). Optional. Settings for download.file.

Unix-specific

Some variables set on Unix-alikes, and not (in general) on Windows.

DISPLAY:
Optional: used by X11, Tk (in package tcltk), the data editor and various packages.
EDITOR:
The path to default editor.
PAGER:
The path to default pager.
R_BROWSER:
The path to default browser.
R_DOC_DIR:
The location of the Rdoc’ directory.
R_DVIPSCMD:
The path to dvips.
R_INCLUDE_DIR:
The location of the Rinclude’ directory.
R_LATEXCMD:
The path to latex.
R_MAKEINDEXCMD:
The path to makeindex.
R_PDFVIEWER:
The path to default PDF viewer.
R_PLATFORM:
The platform – a string of the form cpu-vendor-os, see R.Version.
R_PRINTCMD:
Print command to be used by postscript.
R_SHARE_DIR:
The location of the Rshare’ directory.
R_UNZIPCMD:
The path to unzip.
R_ZIPCMD:
The path to zip.

See Also

Sys.getenv and Sys.setenv to read and set environmental variables in an R session.


[Package base version 2.7.0 Index]