round2 - By default R's round function uses the 'round half to
even' method. This function (taken from https://stackoverflow.com/a/12688836/1000343)
rounds half up.
round_any - This tooling lets you round to fractional values, not
just whole numbers. Code adapted from https://stackoverflow.com/a/8665247/1000343.
Usage
round2(x, digits = 0, ...)
round_any(x, accuracy, f = round2, ...)
Arguments
x
A vector of digits.
digits
The number of decimal places to round to.
accuracy
Number to round to.
f
A function to round (e.g., round, ceiling, floor).
efaults to round2.
…
ignored.
Value
round2 - Returns numeric vector half rounded up.
round_any - Returns a numeric vector or rounded fractional values.