View source: R/create_cell_colors.R
create_cell_colors | R Documentation |
This function returns a character()
vector with valid R colors for a given
input character()
of unique cell types. These were colors that have been
useful in our experience.
create_cell_colors(
cell_types = c("Astro", "Micro", "Oligo", "OPC", "Inhib", "Excit"),
pallet = c("classic", "gg", "tableau"),
split = NA,
preview = FALSE
)
cell_types |
A |
pallet |
Choice of base pallet |
split |
delineating |
preview |
A |
A named character()
vector of R and hex color values compatible
with ggplot2:scale_color_manual()
.
create_cell_colors(pallet = "classic")
create_cell_colors(pallet = "classic", preview = TRUE)
create_cell_colors(pallet = "tableau", preview = TRUE)
## Consider A.1 and A.2 as two different cell types (default)
create_cell_colors(
cell_types = c("A.1", "A.2", "B.1", "C", "D"),
pallet = "gg",
preview = TRUE
)
## Consider A.1 and A.2 as cell type A by using the "split" argument
create_cell_colors(
cell_types = c("A.1", "A.2", "B.1", "C"),
split = "\\.",
pallet = "gg",
preview = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.