dround | R Documentation |
Trim to a certain number of digits (similar to 'format(...,digits=digits)', except that the output remains numeric)
dround(x, digits = 3, roundGreaterThan1 = FALSE)
x |
A vector of numeric values, or a data.frame or similar |
digits |
The number of digits to keep |
roundGreaterThan1 |
Whether to trim also numbers greater than 1 (default FALSE) |
A object of same dimensions as 'x'
dround( c(0.00002345, 554356, 12.56) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.