These functions are wrappers around dplyr::filter() that make it possible to subset rows (corresponding to taxa or samples) using column values in the taxonomy table or sample data.

filter_tax_table(x, ...)

# S4 method for phyloseq
filter_tax_table(x, ...)

# S4 method for taxonomyTable
filter_tax_table(x, ...)

filter_sample_data(x, ...)

# S4 method for phyloseq
filter_sample_data(x, ...)

# S4 method for sample_data
filter_sample_data(x, ...)

Arguments

x

A phyloseq, taxonomyTable, or sample_data object

...

Expressions passed to dplyr::filter()

Examples

data(GlobalPatterns) ps <- GlobalPatterns %>% filter_tax_table(Kingdom == "Bacteria") %>% filter_sample_data(SampleType %in% c("Feces", "Soil"))
#> Error in filter_sample_data(., SampleType %in% c("Feces", "Soil")): could not find function "filter_sample_data"