Reduces the full string indicating taxonomy to the last classified level. Works on tables at levels higher than OTUs.
reduce_names(table)
A table containing the relative abundances of each taxa produced by combine_otus()
Returns the same table with shortened row names
# NOT RUN {
data(otu_table)
data(taxonomy)
# Create a small table for the example
# example <- year_subset("05", otu_table)
# example <- bog_subset("TBE", example)
# clade_table <- combine_otus("Clade", example, taxonomy)
# clade_table <- clade_table[which(rowSums(clade_table) > 0),]
# head(rownames(clade_table))
# reduced_clades <- reduce_names(clade_table)
# head(rownames(reduced_clades))
# }
Run the code above in your browser using DataLab