Learn R Programming

matrixStats (version 0.1.5)

rowRanges: Gets the range of values in each row (column) of a matrix

Description

Gets the range of values in each row (column) of a matrix.

Usage

rowRanges(x, na.rm=FALSE, ...)
  colRanges(x, na.rm=FALSE, ...)
  rowMins(x, na.rm=FALSE, ...)
  colMins(x, na.rm=FALSE, ...)
  rowMaxs(x, na.rm=FALSE, ...)
  colMaxs(x, na.rm=FALSE, ...)

Arguments

x
na.rm
If TRUE, NAs are excluded first, otherwise not.
...
Not used.

Value

  • rowRanges() (colRanges()) returns a numeric Nx2 (Kx2) matrix. rowMins()/rowMaxs() (colMins()/colMaxs()) returns a numeric vector of length N (K).

Details

The rowRanges() function uses the much faster rowOrderStats() if there are no missing values.

See Also

rowOrderStats() and rowRanges().