The rounders package implements rounding algorithms
floor_gap(x, width)
and ceiling_gap(x, width)
round to the
nearest gap in a sequence.library(rounders)
example(round_gap)
#>
#> rnd_gp> floor_gap(c(5, 7, 8, 11, 15, 17, 25), width = 3)
#> [1] 5 5 5 11 15 15 25
#>
#> rnd_gp> ceiling_gap(c(5, 7, 8, 11, 15, 17, 25), width = 3)
#> [1] 8 8 8 11 17 17 25
You can install the development version from GitHub with devtools or remotes.
install.packages("devtools")
devtools::install_github("nacnudus/rounders")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.