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 July 18, 2024, 12:43 p.m.