R/utils.R

Defines functions check

check <- function(n) {
  is.int <- ((n %% 1) == 0)
  if (!is.int) stop("n should be an integer")
  
  is.pos <- (n > 0)
  if (!is.pos) stop("n should be positive")
  
  return()
}

Try the primefactr package in your browser

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

primefactr documentation built on May 1, 2019, 7:32 p.m.