Description Usage Arguments Value Examples
This function is primarily geared towards use in labelling. By default it will
round a numeric vector to a given number of significant digits. E.g. rounding
0.00412
with .digits = 1
will result in 0.004
, while 234
will result
in 200
.
1 | round_significantly(.x, .digits = 0)
|
.x |
Numeric vector. Values to be rounded. |
.digits |
Numeric vector. Number of significant digits you want to keep. |
A rounded numeric vector.
1 2 3 4 | x <- c(-0.0002352, 1234)
round_significantly(x)
round_significantly(x, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.