Re: [R] is.integer() function

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Thu 26 Jan 2006 - 02:35:10 EST


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@hotmail.com>
To:             	r-help@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@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@precheza.cz



R-help@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 Received on Thu Jan 26 03:11:47 2006

This archive was generated by hypermail 2.1.8 : Thu 26 Jan 2006 - 08:07:32 EST