taxa_boxplot: Function to make boxplots of taxa counts or relative...

Description Usage Arguments Value Examples

View source: R/box_plot.R

Description

A function to make boxplots of one specified taxa relative abundance with the option to stratify by a factor variable

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
taxa_boxplot(
  micro_set,
  taxa,
  ...,
  y = ra,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  subtitle = NULL,
  legend_title = NULL
)

Arguments

micro_set

A tidy_micro data set

taxa

A character string. The name of the taxa of interest

...

The factor variable you'd like to stratify by

y

The taxa information

xlab

x-axis label

ylab

y-axis label

main

Plot title

subtitle

Subtitle for the plot

Value

A ggplot that you can add geoms to if you'd like

Examples

1
2
3
4
5
6
data(phy); data(cla); data(ord); data(fam); data(met)
otu_tabs = list(Phylum = phy, Class = cla, Order = ord, Family = fam)
set <- tidy_micro(otu_tabs = otu_tabs, meta = met) %>%
filter(day == 7) ## Only including the first week

set %>% taxa_boxplot("Firmi:Clost:Clostridiales", bpd1)

CharlieCarpenter/tidy.micro documentation built on Jan. 19, 2020, 6:28 p.m.