round_half_up: round_half_up

round_half_upR Documentation

round_half_up

Description

Round according to human-friendly "round-half-up" convention.

Usage

round_half_up(x, digits = 0)

Arguments

x

numeric

digits

integer

Details

R's round() follows the IEEE "round-to-even" rule, meaning that 1.5 will be rounded to 2, but 2.5 will also be rounded to 2. This isn't what many (most?) humans expect.


BAAQMD/qtytools documentation built on June 30, 2022, 6:07 p.m.