Becaues is.integer shows the internal representation, which is not an
integer but a double (real number). Some functions create integer vectors,
for example the : notation:

> is.integer(1:10)
[1] TRUE

You can create an integer vector with the integer() function:

> integer(10)
 [1] 0 0 0 0 0 0 0 0 0 0
> is.integer(integer(10))
[1] TRUE

Gabor

On Tue, Jan 24, 2006 at 09:29:51PM -0600, Taka Matzmoto wrote:
> Hi R users
> I have a simple question to ask.
> Why am I getting FALSE on this
> 
> >is.integer(10)
> [1] FALSE
> 
> 10 is a integer number.
> 
> Thanks in advance.
> 
> M
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Csardi Gabor <[EMAIL PROTECTED]>    MTA RMKI, ELTE TTK

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to