EVOLUTION-MANAGER
Edit File: EnvVar.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Environment Variables</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for EnvVar {base}"><tr><td>EnvVar {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Environment Variables</h2> <h3>Description</h3> <p>Details of some of the environment variables which affect an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session. </p> <h3>Details</h3> <p>It is impossible to list all the environment variables which can affect an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session: some affect the OS system functions which <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 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). </p> <dl> <dt><span class="env">HOME</span>:</dt><dd><p>The user's ‘home’ directory.</p> </dd> <dt><span class="env">LANGUAGE</span>:</dt><dd><p>Optional. The language(s) to be used for message translations. This is consulted when needed.</p> </dd> <dt><span class="env">LC_ALL</span>:</dt><dd><p>(etc) Optional. Use to set various aspects of the locale – see <code><a href="locales.html">Sys.getlocale</a></code>. Consulted at startup.</p> </dd> <dt><span class="env">MAKEINDEX</span>:</dt><dd><p>The path to <code>makeindex</code>. If unset to a value determined when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built. Used by the emulation mode of <code><a href="../../tools/html/texi2dvi.html">texi2dvi</a></code> and <code><a href="../../tools/html/texi2dvi.html">texi2pdf</a></code>.</p> </dd> <dt><span class="env">R_BATCH</span>:</dt><dd><p>Optional – set in a batch session, that is one started by <code>R CMD <a href="../../utils/html/BATCH.html">BATCH</a></code>. Most often set to <code>""</code>, so test by something like <code>!is.na(<a href="Sys.getenv.html">Sys.getenv</a>("R_BATCH", NA))</code>.</p> </dd> <dt><span class="env">R_BROWSER</span>:</dt><dd><p>The path to the default browser. Used to set the default value of <code><a href="options.html">options</a>("browser")</code>.</p> </dd> <dt><span class="env">R_COMPLETION</span>:</dt><dd><p>Optional. If set to <code>FALSE</code>, command-line completion is not used. (Not used by the macOS GUI.)</p> </dd> <dt><span class="env">R_DEFAULT_PACKAGES</span>:</dt><dd><p>A comma-separated list of packages which are to be attached in every session. See <code><a href="options.html">options</a></code>.</p> </dd> <dt><span class="env">R_DOC_DIR</span>:</dt><dd><p>The location of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘<span class="file">doc</span>’ directory. Set by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </dd> <dt><span class="env">R_ENVIRON</span>:</dt><dd><p>Optional. The path to the site environment file: see <a href="Startup.html">Startup</a>. Consulted at startup.</p> </dd> <dt><span class="env">R_GSCMD</span>:</dt><dd><p>Optional. The path to Ghostscript, used by <code><a href="../../grDevices/html/dev2bitmap.html">dev2bitmap</a></code>, <code><a href="../../grDevices/html/dev2bitmap.html">bitmap</a></code> and <code><a href="../../grDevices/html/embedFonts.html">embedFonts</a></code>. Consulted when those functions are invoked. Since it will be treated as if passed to <code><a href="system.html">system</a></code>, spaces and shell metacharacters should be escaped.</p> </dd> <dt><span class="env">R_HISTFILE</span>:</dt><dd><p>Optional. The path of the history file: see <a href="Startup.html">Startup</a>. Consulted at startup and when the history is saved.</p> </dd> <dt><span class="env">R_HISTSIZE</span>:</dt><dd><p>Optional. The maximum size of the history file, in lines. Exactly how this is used depends on the interface. For the <code>readline</code> command-line interface it takes effect when the history is saved (by <code><a href="../../utils/html/savehistory.html">savehistory</a></code> or at the end of a session). </p> </dd> <dt><span class="env">R_HOME</span>:</dt><dd><p>The top-level directory of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> installation: see <code><a href="Rhome.html">R.home</a></code>. Set by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </dd> <dt><span class="env">R_INCLUDE_DIR</span>:</dt><dd><p>The location of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘<span class="file">include</span>’ directory. Set by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </dd> <dt><span class="env">R_LIBS</span>:</dt><dd><p>Optional. Used for initial setting of <code><a href="libPaths.html">.libPaths</a></code>.</p> </dd> <dt><span class="env">R_LIBS_SITE</span>:</dt><dd><p>Optional. Used for initial setting of <code><a href="libPaths.html">.libPaths</a></code>.</p> </dd> <dt><span class="env">R_LIBS_USER</span>:</dt><dd><p>Optional. Used for initial setting of <code><a href="libPaths.html">.libPaths</a></code>.</p> </dd> <dt><span class="env">R_PAPERSIZE</span>:</dt><dd><p>Optional. Used to set the default for <code><a href="options.html">options</a>("papersize")</code>, e.g. used by <code><a href="../../grDevices/html/pdf.html">pdf</a></code> and <code><a href="../../grDevices/html/postscript.html">postscript</a></code>.</p> </dd> <dt><span class="env">R_PCRE_JIT_STACK_MAXSIZE</span>:</dt><dd><p>Optional. Consulted when PCRE's JIT pattern compiler is first used. See <code><a href="grep.html">grep</a></code>.</p> </dd> <dt><span class="env">R_PDFVIEWER</span>:</dt><dd><p>The path to the default PDF viewer. Used by <code>R CMD Rd2pdf</code>.</p> </dd> <dt><span class="env">R_PLATFORM</span>:</dt><dd><p>The platform – a string of the form <code><var>cpu</var>-<var>vendor</var>-<var>os</var></code>, see <code><a href="Version.html">R.Version</a></code>.</p> </dd> <dt><span class="env">R_PROFILE</span>:</dt><dd><p>Optional. The path to the site profile file: see <a href="Startup.html">Startup</a>. Consulted at startup.</p> </dd> <dt><span class="env">R_RD4PDF</span>:</dt><dd><p>Options for <code>pdflatex</code> processing of <code>Rd</code> files. Used by <code>R CMD Rd2pdf</code>.</p> </dd> <dt><span class="env">R_SHARE_DIR</span>:</dt><dd><p>The location of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘<span class="file">share</span>’ directory. Set by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </dd> <dt><span class="env">R_TEXI2DVICMD</span>:</dt><dd><p>The path to <code>texi2dvi</code>. Defaults to the value of <span class="env">TEXI2DVI</span>, and if that is unset to a value determined when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built. Consulted at startup to set the default for <code><a href="options.html">options</a>("texi2dvi")</code>, used by <code><a href="../../tools/html/texi2dvi.html">texi2dvi</a></code> and <code><a href="../../tools/html/texi2dvi.html">texi2pdf</a></code> in package <span class="pkg">tools</span>. </p> </dd> <dt><span class="env">R_UNZIPCMD</span>:</dt><dd><p>The path to <code>unzip</code>. Sets the initial value for <code><a href="options.html">options</a>("unzip")</code> on a Unix-alike when namespace <span class="pkg">utils</span> is loaded.</p> </dd> <dt><span class="env">R_ZIPCMD</span>:</dt><dd><p>The path to <code>zip</code>. Used by <code><a href="../../utils/html/zip.html">zip</a></code> and by <code>R CMD INSTALL --build</code> on Windows.</p> </dd> <dt><span class="env">TMPDIR</span>, <span class="env">TMP</span>, <span class="env">TEMP</span>:</dt><dd><p>Consulted (in that order) when setting the temporary directory for the session: see <code><a href="tempfile.html">tempdir</a></code>. <span class="env">TMPDIR</span> is also used by some of the utilities see the help for <code><a href="../../utils/html/PkgUtils.html">build</a></code>.</p> </dd> <dt><span class="env">TZ</span>:</dt><dd><p>Optional. The current time zone. See <code><a href="timezones.html">Sys.timezone</a></code> for the system-specific formats. Consulted as needed.</p> </dd> <dt><span class="env">no_proxy</span>, <span class="env">http_proxy</span>, <span class="env">ftp_proxy</span>:</dt><dd> <p>(and more). Optional. Settings for <code><a href="../../utils/html/download.file.html">download.file</a></code>: see its help for further details.</p> </dd> </dl> <h3>Unix-specific</h3> <p>Some variables set on Unix-alikes, and not (in general) on Windows. </p> <dl> <dt><span class="env">DISPLAY</span>:</dt><dd><p>Optional: used by <code><a href="../../grDevices/html/x11.html">X11</a></code>, Tk (in package <span class="pkg">tcltk</span>), the data editor and various packages.</p> </dd> <dt><span class="env">EDITOR</span>:</dt><dd><p>The path to the default editor: sets the default for <code><a href="options.html">options</a>("editor")</code> when namespace <span class="pkg">utils</span> is loaded.</p> </dd> <dt><span class="env">PAGER</span>:</dt><dd><p>The path to the pager with the default setting of <code><a href="options.html">options</a>("pager")</code>. The default value is chosen at configuration, usually as the path to <code>less</code>.</p> </dd> <dt><span class="env">R_PRINTCMD</span>:</dt><dd><p>Sets the default for <code><a href="options.html">options</a>("printcmd")</code>, which sets the default print command to be used by <code><a href="../../grDevices/html/postscript.html">postscript</a></code>.</p> </dd> <dt><span class="env">R_SUPPORT_OLD_TARS</span></dt><dd><p>logical. Sets the default for the <code>support_old_tars</code> argument of <code><a href="../../utils/html/untar.html">untar</a></code>. Should be set to <code>TRUE</code> if an old system <code>tar</code> command is used which does not support either <code>xz</code> compression or automagically detecting compression type.</p> </dd> </dl> <h3>See Also</h3> <p><code><a href="Sys.getenv.html">Sys.getenv</a></code> and <code><a href="Sys.setenv.html">Sys.setenv</a></code> to read and set environmental variables in an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session. </p> <p><code><a href="gctorture.html">gctorture</a></code> for environment variables controlling garbage collection. </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>