R/rounding.R

Defines functions customRound

Documented in customRound

#' Custom rounding function to round to the nearest specified interval
#' @param x numeric value(s)
#' @param roundTo rounding interval
#' @return rounded numeric value(s)
#' @author Jason Waddell
#' @export
customRound <- function(x, roundTo){
	round(x/roundTo)*roundTo
}

Try the oaPlots package in your browser

Any scripts or data that you put into this service are public.

oaPlots documentation built on May 2, 2019, 6:46 a.m.