View source: R/small_helpers.R
| round_values | R Documentation |
This function rounds values according to DIN 1333 (round half up).
round_values(values, digits = 0)
values |
Numeric values to round. |
digits |
The number of decimal places the values should be rounded to. |
Returns rounded values
round_numbers1 <- round_values(c(-0.5, -0.4, 0.1, 0.49, 0.5, 1.5, 2.5, 3.2))
round_numbers2 <- round_values(c(-0.5, -0.49, 0.17, 0.499, 0.51, 1.549, 2.51, 3.25),
digits = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.