R/misc.R

Defines functions is_wholenumber

# Function to test whether the values in x are whole numbers

is_wholenumber <- function(x, tol = .Machine$double.eps^0.5) {
  return(abs(x - round(x)) < tol)
}
paulnorthrop/bang documentation built on Dec. 11, 2023, 11:10 p.m.