This help topic is for R version 0.90. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/range.html
range {base}R Documentation

Range of Values

Description

range returns a vector containing the minimum and maximum of all the given arguments. If na.rm is FALSE, NA and NaN values in any of the arguments will cause NA values to be returned, otherwise NA values are ignored.

Usage

range(..., na.rm = FALSE)

Arguments

...

any numeric objects.

na.rm

logical, indicating if NA's should be omitted.

Details

This is a generic function; currently, it has only a default method (range.default) which has an additional argument for indicating whether non-finite elements should be omitted.

It is also a member of the Summary group of functions, see Methods.

See Also

min, max, Methods.

Examples

x <- c(NA, 1:3, -1:1/0); x
range(x)
range(x, na.rm = TRUE)
range(x, finite = TRUE)

[Package base version 0.90 ]