join_tax: Join a dataframe with a taxonomy table.

Description Usage Arguments Value Examples

View source: R/join_tax.R

Description

Join a dataframe with a taxonomy table.

Usage

1
join_tax(df = otu_df, tax_df = otu_good_taxonomy, tax_levels = NULL)

Arguments

df

Dataframe containing an OTU key column (resulting from a prior call to gather) or alternatively numbered Otu columns, in which case gather will be called to create an OTU key column. Defaults to otu_df.

tax_df

Taxonomy table. join_tax assumes that a column called OTU exists in tax_df. Defaults to otu_good_taxonomy.

tax_levels

Vector specifying which taxonomic levels to join from tax_df.

Value

A dataframe resulting from using inner_join on df and tax_df.

Examples

1
2
3
4
5
6
merged_meta_tax_df <- join_tax(df = otu_df, tax_df = otu_good_taxonomy)

filt_merged_meta_tax_df <- dplyr::filter(otu_df, Treatment == "A") %>%
   join_tax()

merged_meta_phy_fam_df <- join_tax(otu_df, otu_good_taxonomy, tax_levels = c("Phylum", "Family"))

cb-42/cbmbtools documentation built on Jan. 9, 2021, 1:38 a.m.