rowOrderStats {matrixStats} | R Documentation |
Gets an order statistic for each row (column) in a matrix.
rowOrderStats(x, which, ...) colOrderStats(x, which, ...)
x |
A numeric NxK matrix . |
which |
An integer index in [1,K] ([1,N]) indicating which
order statistic to be returned. |
... |
Not used. |
The implementation of rowOrderStats()
is optimized for both
speed and memory.
To avoid coercing to double
s (and hence memory allocation), there
is a unique implementation for integer
matrices.
Currently, colOrderStats(x)
is calling rowOrderStats(t(x))
.
Returns a numeric
vector
of length N (K).
This method does not handle missing values, that is, the result
corresponds to having na.rm=FALSE
(if such an argument would
be available).
Henrik Bengtsson (http://www.braju.com/R/)
The native implementation of rowOrderStats()
was adopted from
Robert Gentleman's rowQ
in the Biobase package.
See rowMeans()
in colSums
().