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

Description Usage Arguments Details Value Author(s) See Also

View source: R/rowRanges.R

Description

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

Usage

1
2
3
4
5
6
  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, where N (K) is the number of rows (columns) for which the ranges are calculated.

rowMins()/rowMaxs() (colMins()/colMaxs()) returns a numeric vector of length N (K).

Author(s)

Henrik Bengtsson

See Also

rowOrderStats() and pmin.int().


matrixStats documentation built on May 31, 2017, 2:26 a.m.