Description Usage Arguments Value Examples
View source: R/taxon_sort_gather.R
Transform data from wide to long, join a taxonomic level, aggregate and create summary statistics, and return n OTUs.
1 2 3 4 5 6 7 8 | taxon_sort_gather(
df,
n = 50,
facet_var = NULL,
ord_val = NULL,
tax_df = otu_good_taxonomy,
tax_level = "Phylum"
)
|
df |
Dataframe containing metadata and taxon (Phylum, Otu, etc) abundance data in wide format. |
n |
Number of OTUs to return, 50 by default. Fewer results will be returned if there are not enough entities with non-zero abundances. |
facet_var |
Variable to be used for grouping and eventual faceting, possibly in |
ord_val |
Level with the |
tax_df |
Taxonomy table. Passed to |
tax_level |
Taxonomic level to join from |
A dataframe that has been aggregated and reshaped into long form.
1 2 | filt_ord_facet_df <- dplyr::filter(otu_good_14d, Day == 0, Organ == "Feces") %>%
taxon_sort_gather(facet_var = "Treatment_group", ord_val = "untreated", tax_level = "Phylum")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.