R/round_any.R

Defines functions round_any

Documented in round_any

#' Round to any integer from https://stackoverflow.com/questions/43627679/round-any-equivalent-for-dplyr/46489816#46489816
#'
#' @param x
#' @param accuracy
#'
#' @return
#' @export
#'
#' @examples
round_any = function(x, accuracy, f=round){

  f(x/accuracy) * accuracy

}
brentscott93/biophysr documentation built on Sept. 14, 2021, 2:35 a.m.