EVOLUTION-MANAGER
Edit File: Rhome.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: Return the R Home Directory</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 Rhome {base}"><tr><td>Rhome {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Return the R Home Directory</h2> <h3>Description</h3> <p>Return the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory, or the full path to a component of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> installation. </p> <h3>Usage</h3> <pre> R.home(component = "home") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>component</code></td> <td> <p>As well as <code>"home"</code> which gives the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory, other known values are <code>"bin"</code>, <code>"doc"</code>, <code>"etc"</code>, <code>"include"</code>, <code>"modules"</code> and <code>"share"</code> giving the paths to the corresponding parts of an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> installation.</p> </td></tr> </table> <h3>Details</h3> <p>The <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory is the top-level directory of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> installation being run. </p> <p>The <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory is often referred to as <var>R_HOME</var>, and is the value of an environment variable of that name in an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session. It can be found outside an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session by <code>R <a href="../../utils/html/RHOME.html">RHOME</a></code>. </p> <h3>Value</h3> <p>A character string giving the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory or path to a particular component. Normally the components are all subdirectories of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> home directory, but this need not be the case in a Unix-like installation. </p> <p>The value for <code>"modules"</code> and on Windows <code>"bin"</code> is a sub-architecture-specific location. </p> <p>On a Unix-alike, the constructed paths are based on the current values of the environment variables <span class="env">R_HOME</span> and where set <span class="env">R_SHARE_DIR</span>, <span class="env">R_DOC_DIR</span> and <span class="env">R_INCLUDE_DIR</span> (these are set on startup and should not be altered). </p> <p>On Windows the values of <code>R.home()</code> and <span class="env">R_HOME</span> are switched to the 8.3 short form of path elements if required and if the Windows service to do that is enabled. The value of <span class="env">R_HOME</span> is set to use forward slashes (since many package maintainers pass it unquoted to shells, for example in ‘<span class="file">Makefile</span>’s). </p> <h3>See Also</h3> <p><code><a href="commandArgs.html">commandArgs</a>()[1]</code> may provide related information. </p> <h3>Examples</h3> <pre> ## These result quite platform dependently : rbind(home = R.home(), bin = R.home("bin")) # often a sub directory of 'home' list.files(R.home("bin")) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>