View source: R/round_half_away_from_zero.R
| round_half_away_from_zero | R Documentation |
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.
round_half_away_from_zero(x, digits = 0)
round_commercially(x, digits = 0)
x |
A number to be rounded. |
digits |
The number of digits, as in |
The rounded number.
Other statistics:
column_sums(),
count_groups(),
relative_difference(),
weighted_variance()
x <- 22.5
round_half_away_from_zero(x)
round(x)
round_half_away_from_zero(-x)
round(-x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.