Re: [R] Is.integer and testing for integers

2005-06-30 Thread Prof Brian Ripley
That allows values just bigger than an integer but not just less than an integer. Also, since .Machine$double.eps is a relative tolerance, there are no non-integers greater than one meeting the criterion, and the only non-integers it lets through are like > is.int(c(1e-20, -1e-20)) [1] TRUE FA

Re: [R] Is.integer and testing for integers

2005-06-30 Thread Sundar Dorai-Raj
Tuszynski, Jaroslaw W. wrote: > Hi, > > I was trying to figure out if there is a function in R that tests if R > object contains only integers. I though "is.integer" would be it, but this > function only checks "whether its argument is of integer type or not". As a > result > x = (1:5)^2

[R] Is.integer and testing for integers

2005-06-30 Thread Tuszynski, Jaroslaw W.
Hi, I was trying to figure out if there is a function in R that tests if R object contains only integers. I though "is.integer" would be it, but this function only checks "whether its argument is of integer type or not". As a result x = (1:5)^2 is.integer(x) Returns false. Of cou