range
Get the Range of Data
Description
Retrieves the minimum and the maximum of all of the elements of all of the
arguments.
Usage
range(..., na.rm = FALSE)
range.default(..., na.rm = FALSE, finite = FALSE)
Arguments
... |
numeric objects or character objects. Missing values (NAs) are
allowed.
|
na.rm |
a logical flag. If TRUE, missing values are removed before
computation. The default is FALSE.
|
finite |
a logical flag. If TRUE, infinite and missing values are removed
before computation. The default is FALSE.
|
Details
This function belongs to the Summary group of generic functions.
See Methods.
Value
returns a vector of two elements. The first element is the minimum of
all elements of all the arguments. The second element is the maximum of
all elements of all the arguments. Any NAs in the input result
in NAs in the output, unless na.rm=TRUE or finite=TRUE.
See Also
Examples
range(c(3,4,2))
# [1] 1 4