Skip to content

Instantly share code, notes, and snippets.

@jonesor
Created December 4, 2012 23:13
Show Gist options
  • Save jonesor/4210128 to your computer and use it in GitHub Desktop.
Save jonesor/4210128 to your computer and use it in GitHub Desktop.
R function to round up to a number divisible by n.
roundup <- function(x, n){ceiling(ceiling(x) / n) * n}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment