View source: R/SupportFunctions.R
rounding in R rounds to nearest even number (eg 0.5 rounds to 0), this function does "normal" rounding (eg 0.5 rounds to 1)
1 | round2(x, n = 0)
|
x |
number to be rounded |
n |
decimal place to round to (n=0 rounds to nearest whole number, n=1 rounds to the nearest tenth, n=-1 rounds to the nearest tens digit, etc). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.