R/aaa.R

Defines functions check_palette

#' @importFrom rlang check_installed abort
NULL

check_palette <- function(palette, names, call = rlang::caller_env()) {
  if (!(palette %in% names)) {
    abort(
      paste0(
        "Palette not found. Make sure both package and palette ",
        'name are spelled correct in the format "package::palette".'
      ),
      call = call
    )
  }
}

Try the paletteer package in your browser

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

paletteer documentation built on May 29, 2024, 11:21 a.m.