if (FALSE) {
# Parse data
x = parse_tax_data(hmp_otus, class_cols = "lineage", class_sep = ";",
class_key = c(tax_rank = "taxon_rank", tax_name = "taxon_name"),
class_regex = "^(.+)__(.+)$")
# Get data set by name
print(metacoder:::get_taxmap_table(x, "tax_data"))
print(metacoder:::get_taxmap_table(x, "invalid"))
# Get data set by index
print(metacoder:::get_taxmap_table(x, 1))
print(metacoder:::get_taxmap_table(x, 3)) # invalid
# Get data set by T/F vector
print(metacoder:::get_taxmap_table(x, c(T, F)))
print(metacoder:::get_taxmap_table(x, c(T, T))) # invalid
print(metacoder:::get_taxmap_table(x, c(T, F, F))) # invalid
}
Run the code above in your browser using DataLab