EVOLUTION-MANAGER
Edit File: compareVersion.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: Compare Two Package Version Numbers</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 compareVersion {utils}"><tr><td>compareVersion {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compare Two Package Version Numbers</h2> <h3>Description</h3> <p>Compare two package version numbers to see which is later. </p> <h3>Usage</h3> <pre> compareVersion(a, b) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>a, b</code></td> <td> <p>Character strings representing package version numbers.</p> </td></tr> </table> <h3>Details</h3> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> package version numbers are of the form <code>x.y-z</code> for integers <code>x</code>, <code>y</code> and <code>z</code>, with components after <code>x</code> optionally missing (in which case the version number is older than those with the components present). </p> <h3>Value</h3> <p><code>0</code> if the numbers are equal, <code>-1</code> if <code>b</code> is later and <code>1</code> if <code>a</code> is later (analogous to the C function <code>strcmp</code>). </p> <h3>See Also</h3> <p><code><a href="../../base/html/numeric_version.html">package_version</a></code>, <code><a href="../../base/html/library.html">library</a></code>, <code><a href="packageStatus.html">packageStatus</a></code>. </p> <h3>Examples</h3> <pre> compareVersion("1.0", "1.0-1") compareVersion("7.2-0","7.1-12") </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>