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.default.html
range.default {base}R Documentation

Range of Values

Description

range.default returns a vector containing the minimum and maximum of all the values present in its first arguments, unless na.rm or finite is TRUE. 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. If finite is TRUE, the minimum and maximum of all finite values is computed, i.e., finite=TRUE includes na.rm=TRUE.

Usage

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

Arguments

...

any numeric objects.

na.rm

logical, indicating if NA's should be omitted.

finite

logical, indicating if all non-finite elements should be omitted.

Details

This is the default method of the generic function range.

See Also

range, min, max.

Examples

print(r.x <- range(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)

[Package base version 0.90 ]