[R] Bug in "is" ?

ctu at bigred.unl.edu ctu at bigred.unl.edu
Wed Sep 24 06:40:44 CEST 2008


Hi R users
Is there anything wrong in "is" function? (R 2.7.2)
I believe that everyone will agree that "7" is an integer, right? but  
why R shows 7 is not an integer

> is.integer(7)
[1] FALSE
> is(7,"integer")
[1] FALSE
> is(as.integer(7), "integer")
[1] TRUE

Thank you very much in advance
Chunhao



More information about the R-help mailing list