Define function to check an integer
is.wholenumber(x, tol = .Machine$double.eps^0.5)
x
a numeric
tol
a real which defines the tolerance
a logical. TRUE if x is an integer, FALSE otherwise.