# Define example vector:
vec <- seq(from = 0.01, to = 0.1, by = 0.01)
vec
# The default rounds `x` up from 5:
rounding_bias(x = vec, digits = 1)
# Other rounding procedures are supported,
# such as rounding down from 5...
rounding_bias(x = vec, digits = 1, rounding = "down")
# ...or rounding to even with `base::round()`:
rounding_bias(x = vec, digits = 1, rounding = "even")
Run the code above in your browser using DataLab