From w.huber at dkfz-heidelberg.de  Thu Jun 17 18:54:47 2004
From: w.huber at dkfz-heidelberg.de (Wolfgang Huber)
Date: Thu Jun 17 18:54:54 2004
Subject: [Rd] is.integer() (PR#6984)
In-Reply-To: <20040616144549.6AE271057A@slim.kubism.ku.dk>
References: <20040616144549.6AE271057A@slim.kubism.ku.dk>
Message-ID: <40D1CCD7.2080209@dkfz-heidelberg.de>

Hi Marcio,

it's not a bug, it's a well-documented feature. In the S language, 
numeric literals are floating point by default.

 > mode(9)
[1] "numeric"
 > is.integer(9)
[1] FALSE
 > is.integer(as.integer(9))
[1] TRUE

Best wishes
  Wolfgang


-- 
-------------------------------------
Wolfgang Huber
Division of Molecular Genome Analysis
German Cancer Research Center
Heidelberg, Germany
Phone: +49 6221 424709
Fax:   +49 6221 42524709
Http:  www.dkfz.de/abt0840/whuber
-------------------------------------


mmr@tci.ufal.br wrote:
> Hello!
> 
> I'm not sure if is it a BUG or not...
> I'm using R 1.9.0, and I used the command below:
> 
> 
>>is.integer(9)
> 
> [1] FALSE
> 
> R manual contains this words about the is.integer() function:
> 
> "is.integer returns TRUE or FALSE depending on whether its argument is of 
> integer type or not."
> 
> What's the problem? Am I wrong about the BUG report?
> 
> Thank you very much.
> 
> M?rcio de Medeiros Ribeiro
> Graduando em Ci?ncia da Computa??o
> Departamento de Tecnologia da Informa??o - TCI
> Universidade Federal de Alagoas - UFAL
> Macei? - Alagoas - Brasil
> Projeto CoCADa


[Rd] is.integer() (PR#6984)
Wolfgang Huber