simplify_taxo | R Documentation |
Internally used in clean_pq()
simplify_taxo(
physeq,
pattern_to_remove = c(".__", ".*:"),
remove_space = TRUE,
remove_NA = FALSE
)
physeq |
(required): a |
pattern_to_remove |
(a vector of character) the pattern to remove using |
remove_space |
(logical; default TRUE): do we remove space? |
remove_NA |
(logical; default FALSE): do we remove NA (in majuscule)? |
A phyloseq-class
object with simplified taxonomy
Adrien Taudière
d_fm <- data_fungi_mini
d_fm@tax_table[, "Species"] <- paste0(rep(
c("s__", "s:"),
ntaxa(d_fm) / 2
), d_fm@tax_table[, "Species"])
# First column is the new vector of Species,
# second column is the column before simplification
cbind(
simplify_taxo(d_fm)@tax_table[, "Species"],
d_fm@tax_table[, "Species"]
)
cbind(
simplify_taxo(d_fm, remove_NA = TRUE)@tax_table[, "Species"],
d_fm@tax_table[, "Species"]
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.