Learn R Programming

OTUtable (version 1.1.2)

grab_group: Subset OTU table by taxonomic assignment

Description

Returns a table containing only taxa from a given phylogenetic group

Usage

grab_group(group, level, table, taxonomy)

Arguments

group

The phylogenetic classification of interest (can be a regular expression)

level

The phylogenetic level of the group of interest (must be a column name in the taxonomy file)

table

A table containing the relative abundances of each OTU in the form produced by clean_shared()

taxonomy

A taxonomy dataset in the form produced by expand_taxa()

Value

Returns a table with all taxa of a given taxonomic assignment

Examples

Run this code
# NOT RUN {
 
data(otu_table)
data(taxonomy)

acI <- grab_group("acI", "Clade", otu_table, taxonomy)
verruco <- grab_group("Verrucomicrobia", "Phylum", otu_table, taxonomy)

# Example where two search terms are needed due to classification with two databases
methylophilaceae <- grab_group("Methylophilaceae|betIV", "Clade", otu_table, taxonomy)
# }

Run the code above in your browser using DataLab