Rev 51393 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/EnvVar.Rd% Part of the R package, http://www.R-project.org% Copyright 2007-2010 R Core Development Team% Distributed under GPL 2 or later\name{EnvVar}\alias{environment variables}\alias{HOME}\alias{LANGUAGE}\alias{R_BATCH}\alias{R_BROWSER}\alias{R_COMPLETION}\alias{R_DOC_DIR}\alias{R_DVIPSCMD}\alias{R_GSCMD}\alias{R_HISTFILE}\alias{R_HISTSIZE}\alias{R_INCLUDE_DIR}\alias{R_LATEXCMD}\alias{R_MAKEINDEXCMD}\alias{R_PAPERSIZE}\alias{R_PDFLATEXCMD}\alias{R_PDFVIEWER}\alias{R_PLATFORM}\alias{R_RD4DVI}\alias{R_RD4PDF}\alias{R_SHARE_DIR}\alias{R_TEXI2DVICMD}\alias{R_UNZIPCMD}\alias{R_ZIPCMD}% R_PROFILE, R_ENVIRON are in ?Startup% R_LIBS* are in ?.libPaths% TZ, TZDIR are in ?Sys.timezone% R_HOME is in ?R.home.#ifdef unix\alias{DISPLAY}\alias{EDITOR}\alias{PAGER}\alias{R_PRINTCMD}#endif#ifdef windows\alias{GSC}\alias{R_USER}#endif\title{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 canaffect an \R session: some affect the OS system functions which \Ruses, and others will affect add-on packages. But here are notes onsome of the more important ones. Those that set the defaults foroptions are consulted only at startup (as are some of the others).\describe{\item{\env{HOME}:}{The user's \sQuote{home} directory.}\item{\env{LANGUAGE}:}{Optional. The language(s) to be used formessage translations. This is consulted when needed.}\item{\env{LC_ALL}:}{(etc) Optional. Use to set various aspects ofthe locale -- see \code{\link{Sys.getlocale}}. Consulted at startup.}\item{\env{R_BATCH}:}{Optional -- set in a batch session.}\item{\env{R_BROWSER}:}{The path to the default browser. Used toset the default value of \code{\link{options}("browser")}.}\item{\env{R_COMPLETION}:}{Optional. If set to \code{FALSE},command-line completion is not used. (Not used by Mac OS GUI.)}\item{\env{R_DEFAULT_PACKAGES}:}{A comma-separated list of packageswhich are to be loaded in every session. See \code{\link{options}}.}\item{\env{R_DOC_DIR}:}{The location of the \R \file{doc}directory. Set by \R.}#ifdef unix\item{\env{R_DVIPSCMD}:}{The path to \command{dvips}. Defaults tothe value of \env{DVIPS}, and if that is unset to a valuedetermined when \R was built.Used at startup to set the default for\code{\link{options}("dvipscmd")}, used by\code{\link{help}(help_type="ps")}.}#endif\item{\env{R_ENVIRON}:}{Optional. The path to the site environmentfile: see \link{Startup}. Consulted at startup.}\item{\env{R_GSCMD}:}{Optional. The path to GhostScript, used by\code{\link{dev2bitmap}}, \code{\link{bitmap}} and\code{\link{embedFonts}}. Consulted when those functions are invoked.}\item{\env{R_HISTFILE}:}{Optional. The path of the history file:see \link{Startup}. Consulted at startup and when the history issaved.}\item{\env{R_HISTSIZE}:}{Optional. The maximum size of the historyfile, in lines. Exactly how this is used depends on theinterface.#ifdef unixFor the \code{readline} command-line interface it takes effectwhen the history is saved (by \code{\link{savehistory}} or at theend of a session).#endif#ifdef windowsFor \command{Rgui} it controls the number of lines saved to thehistory file: the size of the history used in the session iscontrolled by the console customization: see \code{\link{Rconsole}}.#endif}\item{\env{R_HOME}:}{The top-level directory of the \Rinstallation: see \code{\link{R.home}}. Set by \R.}\item{\env{R_INCLUDE_DIR}:}{The location of the \R \file{include}directory. Set by \R.}\item{\env{R_LATEXCMD}:}{The path to \code{latex}. Defaults tothe value of \env{LATEX}, and if that is unset to a valuedetermined when \R was built.Used by \command{R CMD Rd2dvi}.}\item{\env{R_LIBS}:}{Optional. Used for initial setting of\code{\link{.libPaths}}.}\item{\env{R_LIBS_SITE}:}{Optional. Used for initial setting of\code{\link{.libPaths}}.}\item{\env{R_LIBS_USER}:}{Optional. Used for initial setting of\code{\link{.libPaths}}.}\item{\env{R_MAKEINDEXCMD}:}{The path to \command{makeindex}.Defaults at startup to the value of \env{MAKEINDEX}, and if thatis unset to a value determined when \R was built.Used by \command{R CMD Rd2dvi}.}\item{\env{R_PAPERSIZE}:}{Optional. Used to set the default for\code{\link{options}("papersize")}, e.g. used by\code{\link{pdf}} and \code{\link{postscript}}.}\item{\env{R_PDFLATEXCMD}:}{The path to \command{pdflatex}.Defaults at startup to the value of \code{PDFLATEX}, and if thatis unset to a value determined when \R was built.Used by \command{R CMD Rd2dvi}.}\item{\env{R_PDFVIEWER}:}{The path to the default PDF viewer. Usedby \command{R CMD Rd2dvi --pdf}.}\item{\env{R_PLATFORM}:}{The platform -- a string of the form\code{\var{cpu}-\var{vendor}-\var{os}}, see \code{\link{R.Version}}.}\item{\env{R_PROFILE}:}{Optional. The path to the site profilefile: see \link{Startup}. Consulted at startup.}\item{\env{R_RD4DVI}:}{Options for \command{latex} processing of\code{Rd} files. Used by \command{R CMD Rd2dvi}.}\item{\env{R_RD4PDF}:}{Options for \command{pdflatex} processing of\code{Rd} files.Used by \command{R CMD Rd2dvi}.}\item{\env{R_SHARE_DIR}:}{The location of the \R \file{share}directory. Set by \R.}\item{\env{R_TEXI2DVICMD}:}{The path to \command{texi2dvi}.Defaults to the value of \env{TEXI2DVI}, and if that is unset to avalue determined when \R was built.#ifdef unixConsulted at startup to set the default for\code{\link{options}("texi2dvi")}, used by\code{\link{texi2dvi}} in package \pkg{tools}.#endif}\item{\env{R_UNZIPCMD}:}{The path to \command{unzip}. Sets theinitial value for \code{\link{options}("unzip")} on a Unix-alikewhen package \pkg{utils} is loaded.}\item{\env{R_ZIPCMD}:}{The path to \command{zip}. Only used in \Ritself by \command{R CMD INSTALL --build} on Windows.}\item{\env{TMPDIR}, \env{TMP}, \env{TEMP}:}{Consulted (in thatorder) when setting the temporary directory for the session: see\code{\link{tempdir}}. \env{TMPDIR} is also used by some of theutilities see the help for \code{\link{build}}.}\item{\env{TZ}:}{Optional. The current timezone. See\code{\link{Sys.timezone}} for the system-specificformats. Consulted as needed.}\item{\env{no_proxy}, \env{http_proxy}, \env{ftp_proxy}:}{(and more). Optional. Settings for \code{\link{download.file}}:see its help for further details.}}}#ifdef unix\section{Unix-specific}{Some variables set on Unix-alikes, and not (in general) on Windows.\describe{\item{\env{DISPLAY}:}{Optional: used by \code{\link{X11}}, Tk (inpackage \pkg{tcltk}), the data editor and various packages.}\item{\env{EDITOR}:}{The path to the default editor: sets thedefault for \code{\link{options}("editor")} when package\pkg{utils} is loaded.}\item{\env{PAGER}:}{The path to the pager with the default setting of\code{\link{options}("pager")}. The default value is chosen atconfiguration, usually as the path to \command{less}.}\item{\env{R_PRINTCMD}:}{Sets the default for\code{\link{options}("printcmd")}, which sets the default printcommand to be used by \code{\link{postscript}}.}}}#endif#ifdef windows\section{Windows-specific}{Some Windows-specific variables are\describe{\item{\env{GSC}:}{Optional: the path to GhostScript, used if\env{R_GSCMD} is not set.}\item{\env{R_USER}:}{The user's \sQuote{home} directory. Set by\R. (\env{HOME} will be set to the same value if not already set.)}\item{\env{TZDIR}:}{Optional. The top-level directory of thetimezone database. See \code{\link{Sys.timezone}}.}}}#endif\seealso{\code{\link{Sys.getenv}} and \code{\link{Sys.setenv}} to read and setenvironmental variables in an \R session.}\keyword{utilities}