amp_boxplot | R Documentation |
Generates boxplots of the most abundant taxa.
amp_boxplot(
data,
group_by = NULL,
sort_by = median,
plot_type = "boxplot",
point_size = 1,
tax_aggregate = "Genus",
tax_add = NULL,
tax_show = 20,
tax_empty = "best",
tax_class = NULL,
order_group = NULL,
order_y = NULL,
plot_flip = FALSE,
plot_log = FALSE,
adjust_zero = NULL,
normalise = TRUE
)
data |
(required) Data list as loaded with |
group_by |
Group the samples by a variable in the metadata. |
sort_by |
Generic function name to use for sorting most abundant taxa, fx |
plot_type |
Plot type. |
point_size |
The size of points. (default: |
tax_aggregate |
The taxonomic level to aggregate the OTUs. (default: |
tax_add |
Additional taxonomic level(s) to display, e.g. |
tax_show |
The number of taxa to show, or a vector of taxa names. (default: |
tax_empty |
How to show OTUs without taxonomic information. One of the following:
|
tax_class |
Converts a specific phylum to class level instead, e.g. |
order_group |
A vector to order the groups by. |
order_y |
A vector to order the y-axis by. |
plot_flip |
(logical) Flip the axes of the plot axis. (default: |
plot_log |
(logical) Log10-scale the plot. (default: |
adjust_zero |
Keep abundances of 0 in the calculation of medians by adding this value. (default: |
normalise |
(logical) Transform the OTU read counts to be in percent per sample. (default: |
A ggplot2 object. If detailed_output = TRUE
a list with a ggplot2 object and additional data.
Kasper Skytte Andersen ksa@bio.aau.dk
Mads Albertsen MadsAlbertsen85@gmail.com
amp_load
# Load example data
data("AalborgWWTPs")
# 10 boxplots grouped by WWTP with phylum name added
amp_boxplot(AalborgWWTPs,
group_by = "Plant",
tax_show = 10,
tax_add = "Phylum"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.