Learn R Programming

ensembleTax (version 1.0.2)

sort_my_taxtab: Sorts taxonomy table by ASV-identifying columns.

Description

Sorts taxonomy table by ASV-identifying columns.

Usage

sort_my_taxtab(tt, ranknames)

Arguments

tt

A taxonomy table supplied as a dataframe (no factors)

ranknames

A character vector of the names of columns of tt that contain taxonomic assignments. tt is sorted by columns not included in ranknames.

Value

a dataframe sorted by the columns specified in ranknames

Details

A helper function for the ...2df family of pre-processing functions. If multiple columns are available to sort, it uses the left-most column.

See Also

bayestax2df, idtax2df

Examples

Run this code
# NOT RUN {
data("bayes.sample")
data("rubric.sample")
bayes.pretty <- bayestax2df(bayes.sample, rubric = rubric.sample)
sort_my_taxtab(bayes.pretty,
ranknames = c("kingdom", "supergroup", "division", "class", "order",
"family", "genus", "species"))

# }

Run the code above in your browser using DataLab