View source: R/S03_Utilities.R
find_increment | R Documentation |
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)
x |
A numeric vector of values. |
n |
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)
find_increment(x, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.