Gets the rank of each row (column) of a matrix.
1 2 3 4 5
The row ranks of
x are collected as rows of the result matrix.
The column ranks of
x are collected as rows if
preserveShape = FALSE, otherwise as columns.
The implementation is optimized for both speed and memory. To avoid
doubles (and hence memory allocation), there
is a unique implementation for
integer matrices. It is
more memory efficient to do
colRanks(x, preserveShape = TRUE) than
t(colRanks(x, preserveShape = FALSE)).
x are ignored and absent in the
rowRanks() function always returns an NxK
matrix, where N (K) is the number of rows (columns)
whose ranks are calculated.
colRanks() function returns an NxK
preserveShape = TRUE, otherwise a KxN
These are ranked as
NA, as with
na.last = "keep" in the
Hector Corrada Bravo and Harris Jaffee. Peter Langfelder for adding
'ties.method' support. Henrik Bengtsson adapted the original native
rowRanks() from Robert Gentleman's
the Biobase package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.