round_to_nearest_digit | R Documentation |
A function that does symmetric rounding to the nearest digits.
round_to_nearest_digit(number, digits = 0)
number |
Input numeric value |
digits |
Input integer indicating the number of decimal places to be used. By default, it symmetrically rounds off to the nearest integer. Default: 0 |
round_to_nearest_digit(0.5)
round_to_nearest_digit(1.5)
round_to_nearest_digit(-0.5)
round_to_nearest_digit(-1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.