R/is.wholenumber.R

Defines functions is.wholenumber

is.wholenumber <- function(x, tol = .Machine$double.eps^0.5){

  if(!is.numeric(x)){
    return(FALSE)
  }

  abs(x - round(x)) < tol

}

Try the TrialSimulator package in your browser

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

TrialSimulator documentation built on Nov. 5, 2025, 7:22 p.m.