round_custom.Rd
A function to receive a number and round up or down according to the next number indicated by roundTo
round_custom(x, roundTo, dir = 1)
A number to round
number indicating to which number to round, e.g., 5 , or 10
A binary indicating rounding down zero or up one
rounded number
x <- c(25, 50, 75, 125, 150, 175, 220)
roundTo <- 5
dir <- 1
round_custom(
x,
roundTo,
dir
)
#> [1] 30 55 80 130 155 180 225