Description Usage Arguments Value Examples
topRank() can quickly identify the top 'n' rows for each column of a matrix. For example, this can be useful for identifying the top 'n' features per cell.
1 |
matrix |
Numeric matrix. |
n |
Integer. Maximum number of items above 'threshold' returned for each ranked row or column. |
margin |
Integer. Dimension of 'matrix' to rank, with 1 for rows, 2 for columns. Default 2. |
threshold |
Numeric. Only return ranked rows or columns in the matrix that are above this threshold. If NULL, then no threshold will be applied. Default 0. |
decreasing |
Logical. Specifies if the rank should be decreasing. Default TRUE. |
List. The 'index' variable provides the top 'n' row (feature) indices contributing the most to each column (cell). The 'names' variable provides the rownames corresponding to these indexes.
1 2 3 | data(sampleCells)
topRanksPerCell <- topRank(sampleCells, n = 5)
topFeatureNamesForCell <- topRanksPerCell$names[1]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.