R/ccolors.R

ccolors <-
function (k) {
  if (k > 7) {
    tmp <- grep("gray", colors())
    tmp <- c(tmp, grep("grey", colors()))
    tmp <- c(tmp, grep("white", colors()))
    tmp <- colors()[-tmp]
    tmp <- tmp[(1:k) * floor(length(tmp)/k)]
  }
  else tmp <- palette()[1:k]
  return(tmp)
}

Try the yaConsensus package in your browser

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

yaConsensus documentation built on April 3, 2025, 10:12 p.m.