medianNorm: Utility to median normalize a matrix by columns

Description Usage Arguments Value Examples

View source: R/medianNorm.R

Description

Divide appropriately to make all column medians equal to the max median

Usage

1

Arguments

mat

Data matrix to normalize; matrix assumed positive

Value

Matrix of same dimensions.

Examples

1
2
3
4
5
6
7
mat = 100+matrix(rnorm(1000), ncol=10)
mat[,10] = mat[,10] + 2
layout(matrix(1:2, nrow=1))
boxplot(mat)
boxplot(medianNorm(mat))

# note: issues when medians close to 0.

Example output

Loading required package: e1071
Loading required package: openxlsx
Loading required package: VennDiagram
Loading required package: grid
Loading required package: futile.logger
Loading required package: lattice

SwathXtend documentation built on Nov. 8, 2020, 6:42 p.m.