Nothing
#' Reduce the number of age groups given a broader set of limits
#'
#' Operates on lower limits
#' @param x vector of limits
#' @param limits new limits
#' @return vector with the new age groups
#' @examples
#' reduce_agegroups(seq_len(20), c(0, 5, 10))
#' @export
reduce_agegroups <- function(x, limits) {
ret <- x[NA]
int <- findInterval(x, sort(limits))
ret[!is.na(int) & int > 0] <-
limits[int[!is.na(int) & int > 0]]
return(ret)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.