roundn | R Documentation |
The standard round function in R rounds x.5 to the nearest even integer. This is odd behavior that is corrected in roundn
roundn(x, digits = 0)
x |
Number to be rounded |
digits |
Sets the number of decimals in rounding. |
n |
A number |
Rampal S. Etienne
round(2.5)
roundn(2.5)
round(3.5)
roundn(3.5)
round(2.65,digits = 1)
roundn(2.65,digits = 1)
round(2.75,digits = 1)
roundn(2.75,digits = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.