find_increment.Rd
Given a range of values and a desired divisor, determines the rounded increment to use. Useful, for example, to determine the equally-spaced intervals to use for a figure's axes.
find_increment(x, n = NULL)
A numeric vector of values.
An integer, the divisor. If not specified, uses the number of standard deviations instead.
A named numeric value, the rounded increment to iterate over the specified number of times, with the estimated place to round to as a name.
x <- rnorm(100)
find_increment(x)
#> 0
#> 1
find_increment(x, 6)
#> 0
#> 1