R/uniDimColors.R

Defines functions uniDimColors

Documented in uniDimColors

#' @export
#' @rdname itemScaleColours
uniDimColors <- function(start,
                         end,
                         length,
                         show=TRUE) {
  res <- grDevices::colorRampPalette(c(start, end))(length);
  if (show) {
    graphics::plot(
      rep(1,length),
      col=res,
      pch=15,
      cex=3,
      axes=FALSE,
      xlab="",
      ylab="");
  }
  return(res);
}

Try the ufs package in your browser

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

ufs documentation built on May 29, 2024, 10:30 a.m.