Donuts for R-users :)
This package is not a wRapper for D3. It provide useRs to create donuts in existing gRphical space (plot aRea).
- usefull r-base functions
- split : Divide into Groups and Reassemble.
- findInterval : Find Interval Numbers or Indices.
###
### split
require(stats); require(graphics)
n <- 10; nn <- 100
g <- factor(round(n * runif(n * nn)))
x <- rnorm(n * nn) + sqrt(as.numeric(g))
xg <- split(x, g)
boxplot(xg, col = "lavender", notch = TRUE, varwidth = TRUE)
###
### findInterval
x <- 2:18
v <- c(5, 10, 15) # create two bins [5,10) and [10,15)
findInterval(x, v)
# [1] 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 3