Description Usage Arguments Value Examples
This is a custom round function that rounds a number to the nearest whole number down if the decimal is below 0.5 and up if it is above. Default R round behavior rounds decimals of 0.5 down when the whole number is even and this function avoids that behavior.
1 | round(x, n)
|
x |
the number or vector of numbers to round (numeric) |
n |
the number of decimal places to round (integer) |
returns a rounded version of the value provided
1 | round(4.5, 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.