alpha_diversity_graph: Create a boxplot of the alpha-diversity. Function from the...

View source: R/alpha_diversity_graph.R

alpha_diversity_graphR Documentation

Create a boxplot of the alpha-diversity. Function from the phylosmith-package.

Description

Inputs a phyloseq-class object and creates boxplot of the alpha diversity as a ggplot object.

Usage

alpha_diversity_graph(phyloseq_obj, treatment = NULL, subset = NULL,
index = "shannon", colors = "default")

Arguments

phyloseq_obj

A phyloseq-class object. It must contain sample_data()) with information about each sample, and it must contain tax_table()) with information about each taxa/gene.

treatment

Column name as a string or number in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

index

The diversity index to calculate ("shannon", "simpson", "invsimpson")

colors

Name of a color set from the RColorBrewer package or a vector palette of R-accepted colors.

Value

ggplot-object

Examples

alpha_diversity_graph(soil_column, index = "shannon",
treatment = c("Matrix", "Treatment"), subset = NULL, colors = "default")

schuyler-smith/phylosmith documentation built on Aug. 17, 2024, 10:19 a.m.