prop_table: Convert OTU table to a proportion table

Description Usage Examples

Description

This function takes an OTU counts table as input returns a proportion table. The default input is samples as rows (Margin=1), but samples can be set to columns by setting Margin to 2.

Usage

1
prop_table(x, Margin = 1)

Examples

1
2
3
4
5
6
7
8
## example otu table with samples as rows
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")

prop_table(otu_tab1)

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