smart.round | R Documentation |
Round floats to integers while preserving their sum ref. https://stackoverflow.com/questions/32544646/round-vector-of-numerics-to-integer-while-preserving-their-sum
smart.round(x, digits = 1)
x |
a numeric vector |
digits |
integer indicating the number of decimal places (round) to be used. |
a numeric vector
smart.round(seq(1,1.5,0.05), 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.