[Rd] small inconsistency in sort

Torsten Hothorn Torsten.Hothorn@rzmail.uni-erlangen.de
Tue Dec 3 14:27:02 2002


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