| EnvVar {base} | R Documentation |
Details of some of the environment variables which affect an R session.
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:LANGUAGE:LC_ALL:Sys.getlocale. Consulted at startup.R_BATCH:R_COMPLETION:FALSE,
comand-line completion is not used. (Not used by Mac OS GUI.)R_DEFAULT_PACKAGES:options.R_DOC_DIR:R_DVIPSCMD: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, and at startup to set the default for
options("latexcmd"), used by
help(offline = TRUE.
R_ENVIRON:R_GSCMD:dev2bitmap.R_HISTFILE:R_HISTSIZE:readline command-line interface it takes effect
when the history is saved (by savehistory or at the
end of a session).
R_HOME:R.home. Set by R.R_INCLUDE_DIR:R_LATEXCMD: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, and at startup to set the default for
options("latexcmd"), used by
help(offline = TRUE.
R_LIBS:.libPaths.R_LIBS_SITE:.libPaths.R_LIBS_USER:.libPaths.R_MAKEINDEXCMD: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:options("papersize"), e.g. used by
pdf, postscript and
help(offline = TRUE).R_PDFLATEXCMD: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:R CMD Rd2dvi.R_PLATFORM:cpu-vendor-os, see R.Version.R_PROFILE:R_RD4DVI:latex processing of
Rd files. Used by R CMD Rd2dvi and
help(offline = TRUE).R_RD4PDF:pdflatex processing of
Rd files. Used by R CMD Rd2dvi.R_SHARE_DIR:R_UNZIPCMD:unzip. Sets the default
value for options("unzip").R_ZIPCMD:zip.TMPDIR, TMP, TEMP:tempdir.TZ:Sys.timezone for the system-specific
formats. Consulted as needed.no_proxy, http_proxy, ftp_proxy:download.file:
see its help for further details.Some variables set on Unix-alikes, and not (in general) on Windows.
DISPLAY:X11, Tk (in
package tcltk), the data editor and various packages.EDITOR:PAGER:R_BROWSER:options("browser").R_PDFVIEWER:R CMD Rd2dvi.R_PRINTCMD:options("printcmd"), which sets the default print
command to be used by postscript.
Sys.getenv and Sys.setenv to read and set
environmental variables in an R session.