This function rounds numeric values to the specified number of decimal digits,
mimicking the behavior of the base R round() function but implemented manually.
Examples
round(3.14159, 2)
#> [1] 3.14
round(c(-2.718, 3.14159), 1)
#> [1] -2.7 3.1
This function rounds numeric values to the specified number of decimal digits,
mimicking the behavior of the base R round() function but implemented manually.
round(3.14159, 2)
#> [1] 3.14
round(c(-2.718, 3.14159), 1)
#> [1] -2.7 3.1