round_any | R Documentation |
Same function from plyr.
round_any(x, accuracy, f = round)
x |
Numeric vector of the values to be rounded |
accuracy |
number to round to |
f |
Rounding function. One of: |
v <- c(1.22, 2.45, 4.12)
round_any(min(v, na.rm = TRUE), accuracy = 0.5 , f = floor)
round_any(max(v, na.rm = TRUE), accuracy = 0.5 , f = ceiling)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.