I am trying to round to the nearest hundredth so that anything above 0.05 and higher rounds up and anything below 0.05 rounds down, so for example I want 0.835 to round to 0.84. I've tried multiple functions such as plyr::round_any
and functions that were shared on the page below but none of them work as I have intended.
How to round up to the nearest 10 (or 100 or X)?
x <- 0.835
round(x, digits = 2)
round_any(x, 0.01, ceiling)