rowRanges {matrixStats}R Documentation

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 A numeric NxK matrix.
na.rm If TRUE, NAs are excluded first, otherwise not.
... Not used.

Details

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

Value

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

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

rowOrderStats() and rowRanges().


[Package matrixStats version 0.1.8 Index]