round_nearest | R Documentation |
Round up or down a number to the nearest value.
round_nearest(x, nearest = -10)
x |
A numeric vector. |
nearest |
A numeric value indicating the nearest value to round by. If negative, will round down to the nearest value. If positive, will round up to the nearest value. |
round_nearest(482.67) round_nearest(482.67, nearest = -.1) round_nearest(482.67, nearest = -50) round_nearest(482.67, nearest = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.