rounds a numeric value to any arbitrary degree of precision. defaults to nearest whole integer
round_any(x, accuracy = 1)
x | a numeric vector |
---|---|
accuracy | a numeric value specifying the base for rounding |
a vector of the same length as x
rounded to the defined accuracy
#> [1] 1.0 1.0 1.5 2.0 2.0