powered by
Check if a value is a whole number
is.wholenumber(x, tol = .Machine$double.eps^0.5)
TRUE if x is within tol of zero, FALSE otherwise.
TRUE
x
tol
FALSE
(numeric(1)) a numeric value.
numeric(1)
(numeric(1)) a precision tolerance.
is.wholenumber(5) is.wholenumber(5.00000000000000001) is.wholenumber(.5)
Run the code above in your browser using DataLab