R/makeRoundUp.R

Defines functions makeRoundUp

#' Round up the provided integer vector \code{int} according to the
#' \code{modulus}.
## Copyright(c) 2017-2024 R. Mark Sharp
## This file is part of nprcgenekeepr
#' @return Integer value equal to the nearest multiple of \code{modulus} that
#' is greater than or equal to \code{int}.
#' @param int integer vector
#' @param modulus integer value to use as the divisor.
#' @noRd
makeRoundUp <- function(int, modulus) {
  int + modulus - int %% modulus
}

Try the nprcgenekeepr package in your browser

Any scripts or data that you put into this service are public.

nprcgenekeepr documentation built on June 8, 2025, 10:55 a.m.