Learn R Programming

ggstatsplot (version 1.1.0)

.is_palette_sufficient: Check if palette has enough number of colors

Description

Aborts with an informative error if the number of factor levels exceeds the number of colors available in the specified palette.

Usage

.is_palette_sufficient(palette, min_length)

Arguments

Examples

Run this code
ggstatsplot:::.is_palette_sufficient("ggthemes::gdoc", 6L)
try(ggstatsplot:::.is_palette_sufficient("ggthemes::gdoc", 30L))

Run the code above in your browser using DataLab