round2 | R Documentation |
Improved rounding function
round2(x, n = 0)
x |
values to be rounded |
n |
number of digits |
numeric
# round a decimal
round2(12345.6789, 2)
# round large numbers
round2(12345.6789, -2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.