R/utils.R

Defines functions get_colors get_melt

get_melt <- function(x) {
    as.data.frame(x) %>%
        pivot_longer(everything())
}

get_colors <- function() {
    c(
        brewer.pal(9, "Set1"),
        brewer.pal(7, "Set2"),
        brewer.pal(8, "Pastel1"),
        brewer.pal(8, "Set2")[-5]
    )
}

Try the GimmeMyPlot package in your browser

Any scripts or data that you put into this service are public.

GimmeMyPlot documentation built on Oct. 18, 2023, 5:10 p.m.