[R] is.integer() function

Petr Pikal petr.pikal at precheza.cz
Wed Jan 25 16:35:10 CET 2006


Hi

Numbers are normaly stored as double so you has to declare it as an 
integer.

> str(10)
 num 10
> str(as.integer(10))
 int 10
>

HTH
Petr



On 24 Jan 2006 at 21:29, Taka Matzmoto wrote:

From:           	"Taka Matzmoto" <sell_mirage_ne at hotmail.com>
To:             	r-help at stat.math.ethz.ch
Date sent:      	Tue, 24 Jan 2006 21:29:51 -0600
Subject:        	[R] is.integer() function

> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list