round_half_away_from_zero {fritools2} | R Documentation |
Round Half Away From Zero
Description
Commercial rounding is done a lot, especially with invoices. There is even
standard 1333 by the German Institute for Standardization.
round
rounds half to even, see round
's Details
section.
round_commercially
is just a link to round_half_away_from_zero
.
Usage
round_half_away_from_zero(x, digits = 0)
round_commercially(x, digits = 0)
Arguments
x |
A number to be rounded. |
digits |
The number of digits, as in |
Value
The rounded number.
See Also
Other statistics:
column_sums()
,
count_groups()
,
relative_difference()
,
weighted_variance()
Examples
x <- 22.5
round_half_away_from_zero(x)
round(x)
round_half_away_from_zero(-x)
round(-x)
[Package fritools2 version 4.1.0 Index]