R/fcolor.R

Defines functions fcolor

#' @noRd
#'
fcolor <- function(x) {
    f <- colorRamp(brewer.pal(11, "Spectral"))
    rr <- range(x)
    svals <- (x - rr[1])/diff(rr)
    colorClust <- rgb(f(svals)/255)
    return(colorClust)
}

Try the tscR package in your browser

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

tscR documentation built on Nov. 8, 2020, 5:53 p.m.