round2 {smallstuff} | R Documentation |
Round to the Nearest Number
Description
Round to the nearest number with the number of digits as indicated. NOTE:
Unlike the base round
function it rounds a 5 to the higher number,
rather than the nearest even number.
Usage
round2(x, digits = 0)
Arguments
x |
number to be rounded |
digits |
number of digits to round to |
Value
Number rounded to the number of digits
indicated
Examples
round2(2.5)
[Package smallstuff version 1.0.3 Index]