powered by
Function borrowed from the example section for integer.
integer
is.wholenumber(x, tol = .Machine$double.eps^0.5)
a numeric vector
How much is x allowed to deviate from round(x) to be a whole number.
x
round(x)
Logical vector with same length as x.
# NOT RUN { is.wholenumber(1) # is TRUE (x <- seq(1, 5, by = 0.5) ) is.wholenumber( x ) #--> TRUE FALSE TRUE ... # }
Run the code above in your browser using DataLab