For renaming taxa, I'm imagining a function rename_taxa(ps, nms) that sets new taxa names where nms is either a vector of length ntaxa(ps) of new names or an expression that can be passed to dplyr::transmute(ps_tibble(tax_table(ps)), nms) %>% pull(1) to generate the new names from the tax table.
For renaming samples, I'm imagining a function rename_samples(ps, nms) that works in the analogous way, but with tax_table(ps) replaced with sample_data(ps)
For renaming taxa, I'm imagining a function
rename_taxa(ps, nms)
that sets new taxa names wherenms
is either a vector of lengthntaxa(ps)
of new names or an expression that can be passed todplyr::transmute(ps_tibble(tax_table(ps)), nms) %>% pull(1)
to generate the new names from the tax table.For renaming samples, I'm imagining a function
rename_samples(ps, nms)
that works in the analogous way, but withtax_table(ps)
replaced withsample_data(ps)