Description Usage Arguments Examples
This function takes two or more otu tables as a list of matrices, and combines them. Must keep rows as samples and taxa as columns (or vice versa, must be consistent) Must provide a list of otu matrices as input (i.e., not a list of dataframes)
1 | combine_otu_tables(otu_tabs)
|
otu_tabs |
a list of otu matrices to be combined |
1 2 3 4 5 6 7 8 9 10 11 12 13 | otu_tab1 <- matrix(
c(2, 4, 3, 1, 5, 7),
nrow=3, ncol=2)
otu_tab2 <- matrix(
c(3, 5, 1, 3, 5, 8),
nrow=2, ncol=3)
rownames(otu_tab1) <- c("otu1","otu2","otu3")
colnames(otu_tab1) <- c("sample1","sample2")
rownames(otu_tab2) <- c("otu3","otu4")
colnames(otu_tab2) <- c("sample3","sample4","sample5")
otu_tabs <- list(otu_tab1, otu_tab2)
combine_otu_tables(otu_tabs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.