1#' Area palettes (continuous) 2#' 3#' @param range Numeric vector of length two, giving range of possible sizes. 4#' Should be greater than 0. 5#' @export 6area_pal <- function(range = c(1, 6)) { 7 force(range) 8 function(x) rescale(sqrt(x), range, c(0, 1)) 9} 10 11#' @param max A number representing the maximum size. 12#' @export 13#' @rdname area_pal 14abs_area <- function(max) { 15 force(max) 16 function(x) rescale(sqrt(abs(x)), c(0, max), c(0, 1)) 17} 18