# NOT RUN {
# Remove singleton taxa, but reassign singletons to supertaxa that pass filter
filter_taxa(unite_ex_data_3, n_obs > 1)
# Remove singleton taxa and associated seqeuence data
filter_taxa(unite_ex_data_3, n_obs > 1, taxonless = FALSE, reassign_obs = FALSE)
# Subset to a single taxon and its subtaxa
filter_taxa(unite_ex_data_3, name == "Basidiomycota", subtaxa = TRUE)
# Remove a taxon and its subtaxa
filter_taxa(unite_ex_data_3, name == "Basidiomycota", subtaxa = TRUE, invert = TRUE)
# Remove taxa, reassigning supertaxa and subtaxa
filter_taxa(unite_ex_data_3, unite_rank != "p")
# }
Run the code above in your browser using DataCamp Workspace