Boolean for evaluating whole numbers

is.whole(a, tol = 0.0000001)

Arguments

a

A numeric vector to evaluate, only first element will be evaluated

tol

numeric >= 0, differences smaller than tolerance are not reported

Value

A Boolean indicating if number is whole or float

Author

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

is.whole( 1 )
#> [1] TRUE
is.whole( 1.5 )
#> [1] FALSE
is.whole( 0.5 )
#> [1] FALSE