[R] The elegant way to test if a number is a whole number
alex at chaotic-neutral.de
Thu Sep 8 21:35:35 CEST 2011
Am 08.09.2011 20:48, schrieb Marc Schwartz:
> There was a post from Martin Maechler some years ago and I had to
search a bit to find it. For these sorts of issues, I typically trust
> The post is here:
> His solution also handles complex numbers.
For those too lazy to follow
He is basically creating the function is.whole:
is.whole <- function(x)
is.numeric(x) && floor(x)==x
Seems like the most appropriate way now. I'll make it so!
Thanks for your help :-)
More information about the R-help