listTaxa: Lists all unique taxonomic names in a Taxonomy at a given...

View source: R/listTaxa.R

listTaxaR Documentation

Lists all unique taxonomic names in a Taxonomy at a given level

Description

Lists all unique taxonomic names in a Taxonomy at a given level

Usage

listTaxa(s, minimum.level = 1, common.name = F, uniques = F)

Arguments

s

Character vector of taxonomic names. First row is species IDs, second row is their taxonomy. This function assumes greengenes-compatible taxonomic strings

minimum.level

Integer. Minimum number of taxonomic levels to include counting from highest to lowest.

common.name

logical whether or not to return the common name in the list of taxa

uniques

logical whether or not to trim taxonomic names to only unique entries

Value

list of taxonomic strings for all taxa up to speficied level.

Examples

data(FTmicrobiome)
sapply(FTmicrobiome$taxonomy[,2],as.character) %>%
   listTaxa(minimum.level=2,uniques=TRUE)

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.