R/mround.R

Defines functions mround

Documented in mround

#' Round to nearest multiple of base
#' 
#' Round percentages to get a whole integer
#' @param x A numeric vector
#' @param base Round to the nearest multiple of this
#' @return A numeric vector
#' @export

mround <- function(x,base){ 
  base*round(x/base) 
} 
joebrew/vilaweb documentation built on Sept. 11, 2020, 3:42 a.m.