| rank_matrix | R Documentation |
Ranks the entries of each column independently using the average
rank for ties, and returns the per-column tie group sizes needed
for the Wilcoxon variance correction. Used internally by
wilcoxauc() (on a transposed input, so that rows become
observations) but exposed as a fast standalone ranking primitive
for sparse and dense numeric matrices.
rank_matrix(X)
## S3 method for class 'dgCMatrix'
rank_matrix(X)
## S3 method for class 'matrix'
rank_matrix(X)
X |
Numeric matrix or |
List with two elements:
X_ranked - matrix with the same shape as X containing
per-column tied ranks.
ties - list of integer vectors, one per column, giving
the sizes of all tie groups encountered in that column. Used
by the Wilcoxon statistic to correct for ties.
wilcoxauc()
set.seed(42)
exprs <- matrix(rpois(25 * 150, lambda = 2), nrow = 25,
dimnames = list(paste0("G", 1:25), NULL))
rank_res <- rank_matrix(exprs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.