From Torsten.Hothorn@rzmail.uni-erlangen.de  Tue Dec  3 14:27:02 2002
From: Torsten.Hothorn@rzmail.uni-erlangen.de (Torsten Hothorn)
Date: Tue Dec  3 14:27:02 2002
Subject: [Rd] small inconsistency in sort
Message-ID: <Pine.LNX.4.21.0212031421030.5202-100000@artemis>

Hi, 

if an atomic with colnames / rownames attribute is sorted, its names are
not sorted in the appropriate way: 

R> a <- matrix(1:5, ncol=5) 
R> colnames(a) <- paste("V", 1:5, sep="")
R> a  
     V1 V2 V3 V4 V5
[1,]  1  2  3  4  5
R> sort(a, dec=TRUE)
     V1 V2 V3 V4 V5
[1,]  5  4  3  2  1
R> 

?sort states that x is `a numeric or complex vector' but sort only checks
if `is.atomic(x)' causing the small problem. 

best,

Torsten



[Rd] small inconsistency in sort
Torsten Hothorn