R/internals.R

Defines functions check_id

check_id <- function(x, id) {
  if (id < 1) stop("id is negative")
  if (id > length(x)) stop("id exceeds the number of colors -", length(x))
}
thibautjombart/palettonr documentation built on April 23, 2020, 7:36 p.m.