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. Those that set the defaults for options are consulted only at startup (as are some of the others).

HOME:
The user's ‘home’ directory.
LANGUAGE:
Optional. The language(s) to be used for message translations. This is consulted when needed.
LC_ALL:
(etc) Optional. Use to set various aspects of the locale – see Sys.getlocale. Consulted at startup.
R_BATCH:
Optional – set in a batch session.
R_BROWSER:
The path to the default browser. Used to set the default value of options("browser").
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_DOC_DIR:
The location of the Rdoc’ directory. Set by R.
R_DVIPSCMD:
The path to dvips. Defaults to the value of DVIPS, and if that is unset to a value determined when R was built. Used by R CMD Rd2dvi.
R_ENVIRON:
Optional. The path to the site environment file: see Startup. Consulted at startup.
R_GSCMD:
Optional. The path to GhostScript, used by dev2bitmap.
R_HISTFILE:
Optional. The path of the history file: see Startup. Consulted at startup and when the history is saved.
R_HISTSIZE:
Optional. The maximum size of the history file, in lines. Exactly how this is used depends on the interface. For Rgui it controls the number of lines saved to the history file: the size of the history when in use is controlled by the console customization: see Rconsole.
R_HOME:
The top-level directory of the R installation: see R.home. Set by R.
R_INCLUDE_DIR:
The location of the Rinclude’ directory. Set by R.
R_LATEXCMD:
The path to latex. Defaults to the value of LATEX, and if that is unset to a value determined when R was built. Used by R CMD Rd2dvi.
R_LIBS:
Optional. Used for initial setting of .libPaths.
R_LIBS_SITE:
Optional. Used for initial setting of .libPaths.
R_LIBS_USER:
Optional. Used for initial setting of .libPaths.
R_MAKEINDEXCMD:
The path to makeindex. Defaults at startup to the value of MAKEINDEX, and if that is unset to a value determined when R was built. Used by R CMD Rd2dvi.
R_PAPERSIZE:
Optional. Use to set the default for options("papersize"), e.g. used by pdf, postscript and help(offline = TRUE).
R_PDFLATEXCMD:
The path to pdflatex. Defaults at startup to the value of PDFLATEX, and if that is unset to a value determined when R was built. Used by R CMD Rd2dvi.
R_PDFVIEWER:
The path to the default PDF viewer. Used by R CMD Rd2dvi.
R_PLATFORM:
The platform – a string of the form cpu-vendor-os, see R.Version.
R_PROFILE:
Optional. The path to the site profile file: see Startup. Consulted at startup.
R_RD4DVI:
Options for latex processing of Rd files. Used by R CMD Rd2dvi and help(offline = TRUE).
R_RD4PDF:
Options for pdflatex processing of Rd files. Used by R CMD Rd2dvi.
R_SHARE_DIR:
The location of the Rshare’ directory. Set by R.
R_TEXI2DVICMD:
The path to texi2dvi. Defaults to the value of TEXI2DVI, and if that is unset to a value determined when R was built.
R_UNZIPCMD:
The path to unzip. Sets the default value for options("unzip").
R_ZIPCMD:
The path to zip.
TMPDIR, TMP, TEMP:
Consulted (in that order) when setting the temporary directory. See tempdir.
TZ:
Optional. The current timezone. See Sys.timezone for the system-specific formats. Consulted as needed.
no_proxy, http_proxy, ftp_proxy:
(and more). Optional. Settings for download.file: see its help for further details.

Windows-specific

Some Windows-specific variables are

GSC:
Optional: the path to GhostScript, used if R_GSCMD is not set.
R_USER:
The user's ‘home’ directory. Set by R. (HOME will be set to the same value if not already set.)
TZDIR:
Optional. The top-level directory of the timezone database. See Sys.timezone.

See Also

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


[Package base version 2.9.1 Index]