View source: R/phyloseq_ntaxa_by_tax.R
phyloseq_ntaxa_by_tax | R Documentation |
Count number of OTUs by taxonomic rank for each sample.
phyloseq_ntaxa_by_tax(
physeq,
TaxRank = "Phylum",
relative = F,
add_meta_data = T
)
physeq |
A phyloseq-class object |
TaxRank |
Name of the taxonomic rank |
relative |
Logical, return relative number of OTUs |
add_meta_data |
Logical, add sample metadata to the resulting table |
This function will split phyloseq object by the specified taxonomic rank
Data frame with OTU counts (columns: Sample, TaxRank, N.OTU + optional sample metadata).
data(GlobalPatterns)
phylum_counts <- phyloseq_ntaxa_by_tax(GlobalPatterns, TaxRank = "Phylum")
head(phylum_counts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.