Description Usage Arguments Value Examples
View source: R/basic_functions.R
This function is an extension with regard to the function round
from base R as it allows not only digits as precision, but can also round to
a user-specified precision. The interval in which the rounding operation is
to be carried out also can be specified by the user (default is the unit
interval). Alternatively, breaks can be provided.
1 | round_precision(x, breaks = NULL, in_precision = 0.05, in_interval = c(0, 1))
|
x |
Vector to be rounded |
breaks |
The breaks used for rounding. Default NULL |
in_precision |
Precition default 0.05 |
in_interval |
Interval needs to be larger than the precision value |
A list with two entries:
values
: the rounded
vector
breaks
: the breaks used for rounding
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.