powered by
Rounds a value to nearest increment
rounder(x, inc, fun = "round")
The value to be rounded
The increment to round to
The rounding function. Valid options are 'floor', 'round' and 'ceiling'.
an object of class numeric
numeric
# NOT RUN { rounder(.92, .05) rounder(.93, .05) rounder(.93, .05, "floor") rounder(.93, .05, "ceiling") # }
Run the code above in your browser using DataLab