View source: R/taxa_prevalence.R
taxa.prevalence | R Documentation |
This function uses the abundance table in a 'phyloseq' object to determine how many samples a given taxon (OTU/ASV) occurs in and returns either a named vector or a 'data.table' with the results
taxa.prevalence( physeq, sorted = c("from.table", "by.taxon", "decreasing", "increasing"), return.table = FALSE )
physeq |
a phyloseq object with an 'otu_table' |
sorted |
character; how do you want the results sorted? "from.table" returns the results in the same order as the column names in the 'otu_table'. "by.taxon returns the results sorted alphanumerically by taxon name. "decreasing" returns the results sorted by abundance, highest to lowest. "increasing" returns the results sorted by abundance, lowest to highest. Default is "from.table". |
return.table |
logical; if TRUE, returns a 2-column 'data.table' with results. If FALSE, returns a named vector |
phyloseq
, otu_table
, otu.matrix
, data.table
data(example_phyloseq) head(sort(taxa.prevalence(example_phyloseq), decreasing = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.