[ top | up ]

Range of Values

Syntax

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

Description

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

This definition of range should not be confused with the sample range.

See Also

min, max.

Examples

print(r.x <- range(rnorm(100))) diff(r.x) #-- THE sample range