EVOLUTION-MANAGER
Edit File: Version.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: Version Information</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 R.Version {base}"><tr><td>R.Version {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Version Information</h2> <h3>Description</h3> <p><code>R.Version()</code> provides detailed information about the version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> running. </p> <p><code>R.version</code> is a variable (a <code><a href="list.html">list</a></code>) holding this information (and <code>version</code> is a copy of it for S compatibility). </p> <h3>Usage</h3> <pre> R.Version() R.version R.version.string version </pre> <h3>Details</h3> <p>This gives details of the OS under which <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built, not the one under which it is currently running (for which see <code><a href="Sys.info.html">Sys.info</a></code>). </p> <p>Note that OS names might not be what you expect: for example macOS Mavericks 10.9.4 identifies itself as <span class="samp">darwin13.3.0</span>, Linux usually as <span class="samp">linux-gnu</span> and Solaris 10 as <span class="samp">solaris2.10</span>. </p> <h3>Value</h3> <p><code>R.Version</code> returns a list with character-string components </p> <table summary="R valueblock"> <tr valign="top"><td><code>platform</code></td> <td> <p>the platform for which <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built. A triplet of the form CPU-VENDOR-OS, as determined by the configure script. E.g, <code>"i686-unknown-linux-gnu"</code> or <code>"i386-pc-mingw32"</code>. </p> </td></tr> <tr valign="top"><td><code>arch</code></td> <td> <p>the architecture (CPU) <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built on/for.</p> </td></tr> <tr valign="top"><td><code>os</code></td> <td> <p>the underlying operating system.</p> </td></tr> <tr valign="top"><td><code>system</code></td> <td> <p>CPU and OS, separated by a comma.</p> </td></tr> <tr valign="top"><td><code>status</code></td> <td> <p>the status of the version (e.g., <code>"alpha"</code>)</p> </td></tr> <tr valign="top"><td><code>major</code></td> <td> <p>the major version number</p> </td></tr> <tr valign="top"><td><code>minor</code></td> <td> <p>the minor version number, including the patchlevel</p> </td></tr> <tr valign="top"><td><code>year</code></td> <td> <p>the year the version was released</p> </td></tr> <tr valign="top"><td><code>month</code></td> <td> <p>the month the version was released</p> </td></tr> <tr valign="top"><td><code>day</code></td> <td> <p>the day the version was released</p> </td></tr> <tr valign="top"><td><code>svn rev</code></td> <td> <p>the Subversion revision number, which should be either <code>"unknown"</code> or a single number. (A range of numbers or a number with <span class="samp">M</span> or <span class="samp">S</span> appended indicates inconsistencies in the sources used to build this version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.) </p> </td></tr> <tr valign="top"><td><code>language</code></td> <td> <p>always <code>"R"</code>.</p> </td></tr> <tr valign="top"><td><code>version.string</code></td> <td> <p>a <code><a href="character.html">character</a></code> string concatenating some of the info above, useful for plotting, etc.</p> </td></tr> </table> <p><code>R.version</code> and <code>version</code> are lists of class <code>"simple.list"</code> which has a <code>print</code> method. </p> <h3>Note</h3> <p>Do <em>not</em> use <code>R.version$os</code> to test the platform the code is running on: use <code>.Platform$OS.type</code> instead. Slightly different versions of the OS may report different values of <code>R.version$os</code>, as may different versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. </p> <p><code>R.version.string</code> is a copy of <code>R.version$version.string</code> for simplicity and backwards compatibility. </p> <h3>See Also</h3> <p><code><a href="../../utils/html/sessionInfo.html">sessionInfo</a></code> which provides additional information; <code><a href="numeric_version.html">getRversion</a></code> typically used inside R code, <code><a href="Platform.html">.Platform</a></code>, <code><a href="Sys.info.html">Sys.info</a></code>. </p> <h3>Examples</h3> <pre> require(graphics) R.version$os # to check how lucky you are ... plot(0) # any plot mtext(R.version.string, side = 1, line = 4, adj = 1) # a useful bottom-right note ## a good way to detect macOS: if(grepl("^darwin", R.version$os)) message("running on macOS") ## Short R version string, ("space free", useful in file/directory names; ## also fine for unreleased versions of R): shortRversion <- function() { rvs <- R.version.string if(grepl("devel", (st <- R.version$status))) rvs <- sub(paste0(" ",st," "), "-devel_", rvs, fixed=TRUE) gsub("[()]", "", gsub(" ", "_", sub(" version ", "-", rvs))) } shortRversion() </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>