Skip to content
Prev 143717 / 398500 Next

Is there in R a function equivalent to the mround, as found in most spreadsheets?

I've implemented a slightly more general form in the reshape package:

round_any <- function (x, accuracy, f = round) {
    f(x/accuracy) * accuracy
}

Hadley