format_mat: Format Matrix

Description Usage Arguments Value

Description

This function provides the ability to format your matrix in various ways. For instance, you can log transform, row normalize, and quantile normalize. It is best to use the log.transform and norm.method separately (i.e. make to calls of format_mat)

Usage

1
2
format_mat(mat, log.transform = FALSE, log.base = 2,
  norm.method = c("none", "quantile", "z", "max"), min.val)

Arguments

mat

The input matrix.

log.transform

Boolean to indicate whether the log transform the matrix.

log.base

The base to use for the log transformation.

min.val

Minimum value of the matrix. Any values in the matrix below this value will be set to this value. This is useful if trying to log transform a matrix. For instance, if log2 transforming then any values less than 1 will produce negative values. Setting min.val = 1 will ensure that any values less than 1 be log transformed to 0.

correct.inf.flag

Booelean to set whether.

Value

A formatted matrix.


tinyheero/tinyutils documentation built on May 31, 2019, 3:36 p.m.