Log2 Transformation

trans_log2(mat)

Arguments

mat

a numeric matrix with the expression values, where columns are the samples and rows are probesets, transcripts, or genes.

Value

log2 transformed matrix

Examples

myexp <- sapply(1:10, function(i) rnbinom(10000, mu = 4, size = 1)) myexp_l2 <- trans_log2(myexp) par(mfrow = c(1,2)) hist(myexp) hist(myexp_l2)