round2 | R Documentation |
Given a number and a digit to round to, returns the rounded number, with 5 always rounded upwards.
round2(x, n)
x |
the data to be rounded |
n |
the number of digits to round to |
This function differs from round
, which rounds 5 "towards the
even number". Rounding 5s up leads to bias when positive and negative numbers
are expected, but can be desired in some cases.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.