roundTo | R Documentation |
This function rounds a value to a nearest "target" value (e.g., you could round 0.72 to the nearest 0.25, or 0.75).
roundTo(x, target, roundFx = round)
x |
Numeric. |
target |
Numeric. |
roundFx |
Any of |
Numeric.
roundTo(0.73, 0.05)
roundTo(0.73, 0.1)
roundTo(0.73, 0.25)
roundTo(0.73, 0.25, floor)
roundTo(0.73, 1)
roundTo(0.73, 10)
roundTo(0.73, 10, ceiling)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.