Test whether an object is a whole number.

is.wholenumber(x, tol = .Machine$double.eps^0.5)

Arguments

x

object to be tested

tol

tolerance within which a number is said to be whole

Value

Vector of logicals.

Examples

is.wholenumber(seq(-3,3,.5))
#> [1] TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE #> [13] TRUE