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

Wolfgang Huber w.huber at dkfz-heidelberg.de
Thu Jun 17 18:54:47 CEST 2004


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 at 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



More information about the R-devel mailing list