rnd | R Documentation |
Round to a given number of significant digits to show variability in a vector of numbers.
rnd(x, digits, ...)
## Default S3 method:
rnd(x, ...)
x |
an object to be rounded and formatted |
digits |
significant digits for variation in x |
... |
passed on to |
Instead of rounding to a given number of significant digits, or rounding to a given significance, 'rnd' rounds so that the variability in a set of number is exhibited to a given number of digits. For example, 100.1233, 100.2345, 100.3456, rounded to 3 significant digits would be 100., 100., 100., but rounded to 3 significant digits for variability is 100.123, 100.234, 100.345.
rnd(default)
: default method
pfmt
, rpfmt
rnd(c(0.00001111111,0.000022222,0.000015), scientific = F)
rnd(c(0.00001111111,0.000022222,0.000015)+100, scientific = F)
round(c(0.00001111111,0.000022222,0.000015))
round(c(0.00001111111,0.000022222,0.000015)+100)
rnd(123)
rnd(123.45678901)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.