#' calcbin
#'
#' Code extracted from Vizumap to compute the bins from which
#' the 3x3 grid is produced.
#'
#' Permission granted from authors under GPL
#'
calcbin <- function (terciles, data, x, q, bin, width, min)
{
estbin <- ifelse(terciles, round(quantile(data[, x], q),
2), round(bin * width + min, 2))
estbin
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.