View source: R/colors_for_annotation.R
sample_annotation_to_colors | R Documentation |
Convert the sample annotation data frame to list of colors the list is named as columns included to use in plotting functions
sample_annotation_to_colors(sample_annotation,
sample_id_col = "FullRunName", factor_columns = c("MS_batch",
"EarTag", "digestion_batch", "Strain", "Diet"),
numeric_columns = c("DateTime", "order"),
rare_categories_to_other = TRUE, guess_factors = FALSE,
numeric_palette_type = "brewer")
sample_annotation |
data frame with:
.
See |
sample_id_col |
name of the column in |
factor_columns |
columns of |
numeric_columns |
columns of |
rare_categories_to_other |
if |
guess_factors |
whether attempt which of the |
numeric_palette_type |
palette to be used for
numeric values coloring (can be |
list of three items:
list of colors;
data frame of colors;
new sample annotation (e.g. rare factor levels merged into "other")
color_scheme <- sample_annotation_to_colors (example_sample_annotation,
factor_columns = c('MS_batch','EarTag', "Strain",
"Diet", "digestion_batch", "Sex"),
numeric_columns = c('DateTime', 'order'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.