EVOLUTION-MANAGER
Edit File: range.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: Range of Values</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 range {base}"><tr><td>range {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Range of Values</h2> <h3>Description</h3> <p><code>range</code> returns a vector containing the minimum and maximum of all the given arguments. </p> <h3>Usage</h3> <pre> range(..., na.rm = FALSE) ## Default S3 method: range(..., na.rm = FALSE, finite = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>any <code><a href="numeric.html">numeric</a></code> or character objects.</p> </td></tr> <tr valign="top"><td><code>na.rm</code></td> <td> <p>logical, indicating if <code><a href="NA.html">NA</a></code>'s should be omitted.</p> </td></tr> <tr valign="top"><td><code>finite</code></td> <td> <p>logical, indicating if all non-finite elements should be omitted.</p> </td></tr> </table> <h3>Details</h3> <p><code>range</code> is a generic function: methods can be defined for it directly or via the <code><a href="groupGeneric.html">Summary</a></code> group generic. For this to work properly, the arguments <code>...</code> should be unnamed, and dispatch is on the first argument. </p> <p>If <code>na.rm</code> is <code>FALSE</code>, <code>NA</code> and <code>NaN</code> values in any of the arguments will cause <code>NA</code> values to be returned, otherwise <code>NA</code> values are ignored. </p> <p>If <code>finite</code> is <code>TRUE</code>, the minimum and maximum of all finite values is computed, i.e., <code>finite = TRUE</code> <em>includes</em> <code>na.rm = TRUE</code>. </p> <p>A special situation occurs when there is no (after omission of <code>NA</code>s) nonempty argument left, see <code><a href="Extremes.html">min</a></code>. </p> <h3>S4 methods</h3> <p>This is part of the S4 <code><a href="../../methods/html/S4groupGeneric.html">Summary</a></code> group generic. Methods for it must use the signature <code>x, ..., na.rm</code>. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="Extremes.html">min</a></code>, <code><a href="Extremes.html">max</a></code>. </p> <p>The <code><a href="../../grDevices/html/extendrange.html">extendrange</a>()</code> utility in package <span class="pkg">grDevices</span>. </p> <h3>Examples</h3> <pre> (r.x <- range(stats::rnorm(100))) diff(r.x) # the SAMPLE range x <- c(NA, 1:3, -1:1/0); x range(x) range(x, na.rm = TRUE) range(x, finite = TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>