taxa_summary: Summarize the information

Description Usage Arguments Value Examples

View source: R/taxa_summary.R

Description

Give taxa summary table stratified by variables of interest and/or OTU tables

Usage

1
taxa_summary(micro_set, ..., table = NULL, obj = ra, taxa = TRUE)

Arguments

micro_set

A tidy_micro data set

...

Covariates of interest

table

OTU table of interest. If NULL, all tables will be used

obj

The taxonomic information of interest

taxa

Logical; Whether or not to stratify by taxa

Value

A tibble containing columns of stratifying variables and several summary columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(bpd_phy); data(bpd_cla); data(bpd_ord); data(bpd_fam); data(bpd_clin)
otu_tabs = list(Phylum = bpd_phy, Class = bpd_cla,
Order = bpd_ord, Family = bpd_fam)

set <- tidy_micro(otu_tabs = otu_tabs, clinical = bpd_clin) %>%
mutate(bpd1 = factor(bpd1))

## Summarize each taxa by Table
set %>% taxa_summary

## Summarize each taxa by a categorical variable of interest
set %>% taxa_summary(bpd1)

## Summarize each taxa by a categorical variable of interest within a Table
set %>% taxa_summary(bpd1, table = "Phylum")

## Summarize within group or table only
set %>% taxa_summary(taxa = FALSE)

CharlieCarpenter/tidyMicro documentation built on April 25, 2021, 4:09 p.m.