Learn R Programming

thisutils (version 0.3.1)

matrix_process: Process matrix

Description

Process matrix

Usage

matrix_process(
  matrix,
  method = c("raw", "zscore", "fc", "log2fc", "log1p"),
  ...
)

Value

A processed matrix.

Arguments

matrix

A matrix.

method

Method to use for processing the matrix.

...

Other arguments passed to the method.

Examples

Run this code
m <- simulate_sparse_matrix(10, 10)
matrix_process(m, method = "raw")
matrix_process(m, method = "zscore")
matrix_process(m, method = "fc")
matrix_process(m, method = "log2fc")
matrix_process(m, method = "log1p")
m <- as_matrix(m)
matrix_process(m, method = function(x) x / rowMeans(x))

Run the code above in your browser using DataLab