inst/Examples/arrowFactor.R

arrowColors<- function(v, colors) {
    n <- length(v); k <- length(colors)
    midPoints <- (v[-1] + v[-n])/2
    colors[cut(midPoints, k)]
}

Try the SoDA package in your browser

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

SoDA documentation built on Oct. 28, 2020, 9:07 a.m.