clr_samples_rows: Calculate the centered log transform (clr) of an otu table.

Description Usage References Examples

Description

This function takes an OTU counts table as input returns the clr transform. Samples must be rows, and columns as otus. The default log base is 2. Log base can also be set to 10 or natural log

Usage

1
clr_samples_rows(x, constant = 0.5, log = 2)

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data, Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.

Examples

1
2
3
4
5
6
7
8
## example
otu_tab1 <- matrix(
c(2, 4, 3, 1, 5, 7),
nrow=2, ncol=3)
rownames(otu_tab1) <- c("sample1","sample2")
colnames(otu_tab1) <- c("otu1","otu2","otu3")

clr_samples_rows(otu_tab1)

cjschulz/micromixR documentation built on May 13, 2019, 7:32 p.m.