rounder: Round to Increment

Description Usage Arguments Value Examples

Description

Rounds a value to nearest increment

Usage

1
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

1
2
3
4
rounder(.92, .05)
rounder(.93, .05)
rounder(.93, .05, "floor")
rounder(.93, .05, "ceiling")

RyanHope/Rmisc documentation built on May 9, 2019, 10:38 a.m.