color_reassign | R Documentation |
To customize the color order in the plot, use this function to directly assign groups a specific color
color_reassign(cdf, group_assignment, color_assignment, group_level = "Phylum")
cdf |
data.frame containing the color key |
group_assignment |
string vector of taxonomic groups |
color_assignment |
sting vector of corresponding color assignment |
group_level |
string indiating the taxonomic level of group_assignment |
cdf data.frame
library(phyloseq)
data(GlobalPatterns)
mdf <- prep_mdf(GlobalPatterns)
color_obj <- create_color_dfs(mdf)
mdf_group <- color_obj$mdf
cdf <- color_obj$cdf
new_cdf <- color_reassign(cdf,
group_assignment = c("Firmicutes", "Actinobacteria"),
color_assignment = c("micro_cvd_blue", "micro_cvd_purple"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.