IsWhole(x, tol = .Machine$double.eps^0.5, na.rm = FALSE)
Arguments
x
a (non-empty) numeric vector of data values.
tol
tolerance to be used
na.rm
logical, indicating whether NA values should be stripped before the computation proceeds. Defaults to FALSE.
Value
logical vector of the same dimension as x.
Details
This is the suggested solution for doing the job, as is.integer tests for (class(x) == "integer") and does not test if x contains integer numbers.
(Why not simply implement it in base?)