round2: Rounding of Numbers

View source: R/round2.R

round2R Documentation

Rounding of Numbers

Description

R “rounds to even” when rounding off a 5. This formula rounds numbers ending in .5 up ("rounding in commerce"). This formula is based on http://alandgraf.blogspot.com/2012/06/rounding-in-r.html

Usage

round2(x, digits = 1)

Arguments

x

a numeric vector

digits

integer indicating the number of decimal places


th-zelniker/TIMI documentation built on Oct. 1, 2022, 2 p.m.