rounder {Rmisc} | R Documentation |
Rounds a value to nearest increment
rounder(x, inc, fun = "round")
x |
The value to be rounded |
inc |
The increment to round to |
fun |
The rounding function. Valid options are 'floor', 'round' and 'ceiling'. |
an object of class numeric
rounder(.92, .05)
rounder(.93, .05)
rounder(.93, .05, "floor")
rounder(.93, .05, "ceiling")