rounds a numeric value to any arbitrary degree of precision. defaults to nearest whole integer

round_any(x, accuracy = 1)

Arguments

x

a numeric vector

accuracy

a numeric value specifying the base for rounding

Value

a vector of the same length as x rounded to the defined accuracy

Examples

round_any(c(1, 1.25, 1.5, 1.75, 2), accuracy = 0.5)
#> Error in round_any(c(1, 1.25, 1.5, 1.75, 2), accuracy = 0.5): could not find function "round_any"