round_range | R Documentation |
This rounds the lower and upper values of a range down and up, respectively, by a user-specified amount. This can be useful, for example, in the creation of plots with suitable axis limits. The function uses round_any
.
round_range(x, digits = "auto")
x |
A vector of two numbers to be round down and up respectively. |
digits |
The precision of rounding (e.g. to the nearest 0.1). "auto" is allowed which attempts to define suitable accuracy automatically. |
A number.
Edward Lavender
round_range(c(0.987, 10.982), "auto")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.