rankedMatrix: Calculate a ranked matrix

rankedMatrixR Documentation

Calculate a ranked matrix

Description

Calculate a ranked matrix

Usage

rankedMatrix(object, ...)

## S4 method for signature 'matrix'
rankedMatrix(
  object,
  MARGIN = 2L,
  method = c("increasing", "decreasing", "bidirectional"),
  tiesMethod = c("average", "first", "last", "random", "max", "min")
)

Arguments

object

Object.

MARGIN

integer(1). Direction to apply the function. 1 indicates rows, 2 indicates columns.

method

character(1). Rank the values in increasing, decreasing, or bidirectional order.

tiesMethod

character(1). How ties should be treated. See rank() for details.

...

Additional arguments.

Details

Ties are resolved automatically by calculating the average. See the ties.method parameter in rank() for details.

Value

matrix.

Note

Updated 2021-02-04.

See Also

  • rank().

  • Not to be confused with Matrix::rankMatrix().

Examples

data(matrix_lfc, package = "AcidTest")
object <- matrix_lfc

## Increasing (negative to positive).
rankedMatrix(object, method = "increasing")

## Decreasing (positive to negative).
rankedMatrix(object, method = "decreasing")

## Bidirectional.
rankedMatrix(object, method = "bidirectional")

acidgenomics/AcidBase documentation built on Jan. 28, 2024, 2:59 a.m.