[R] odd behaviour of identical

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Sun Oct 26 23:39:09 CET 2008


given what ?identical says, i find the following odd:

x = 1:10
y = 1:10

all.equal(x,y)
[1] TRUE
identical(x,y)
[1] TRUE

y[11] = 11
y = y[1:10]

all.equal(x,y)
[1] TRUE
identical(x,y)
[1] FALSE

y
[1] 1 2 3 4 5 6 7 8 9 10
length(y)
[1] 10


looks like a bug.

platform       i686-pc-linux-gnu          
arch           i686                       
os             linux-gnu                  
system         i686, linux-gnu            
status                                    
major          2                          
minor          7.0                        
year           2008                       
month          04                         
day            22                         
svn rev        45424                      
language       R                          
version.string R version 2.7.0 (2008-04-22)


vQ

-- 
-------------------------------------------------------------------------------
Wacek Kusnierczyk, MD PhD

Email: waku at idi.ntnu.no
Phone: +47 73591875, +47 72574609

Department of Computer and Information Science (IDI)
Faculty of Information Technology, Mathematics and Electrical Engineering (IME)
Norwegian University of Science and Technology (NTNU)
Sem Saelands vei 7, 7491 Trondheim, Norway
Room itv303

Bioinformatics & Gene Regulation Group
Department of Cancer Research and Molecular Medicine (IKM)
Faculty of Medicine (DMF)
Norwegian University of Science and Technology (NTNU)
Laboratory Center, Erling Skjalgsons gt. 1, 7030 Trondheim, Norway
Room 231.05.060



More information about the R-help mailing list