Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rounder

Round to Increment


Description

Rounds a value to nearest increment

Usage

rounder(x, inc, fun = "round")

Arguments

x

The value to be rounded

inc

The increment to round to

fun

The rounding function. Valid options are 'floor', 'round' and 'ceiling'.

Value

an object of class numeric

Examples

rounder(.92, .05)
rounder(.93, .05)
rounder(.93, .05, "floor")
rounder(.93, .05, "ceiling")

Rmisc

Rmisc: Ryan Miscellaneous

v1.5
GPL-3
Authors
Ryan M. Hope <rmh3093@gmail.com>
Initial release
2013-10-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.