round5: Round Numbers

Description Usage Arguments Examples

Description

Does not handle rounding of .5 in the usual R way.

Usage

1
round5(x, digits = 0)

Arguments

x

A vector of numeric values.

digits

Number of decimal places. Defaults to 0 (round to the whole number).

Examples

1
2
round(.5 + -2:4) # -2  0  0  2  2  4  4
round5(.5 + -2:4) # -2  -1  1  2  3  4  5

tnedu/acct documentation built on June 13, 2019, 7:30 a.m.