From p.dalgaard@biostat.ku.dk  Tue Mar 27 17:21:25 2001
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 27 Mar 2001 18:21:25 +0200
Subject: [Rd] sort(list(..)) ?
In-Reply-To: Martin Maechler's message of "Tue, 27 Mar 2001 18:05:51 +0200"
References: <15040.47711.87247.785763@gargle.gargle.HOWL>
Message-ID: <x2g0fz9o8q.fsf@blueberry.kubism.ku.dk>

Martin Maechler <maechler@stat.math.ethz.ch> writes:

> in do_sort(.) in src/main/sort.c .
> This doesn't quite pass "make check" currently because
> 
>   is.factor(factor(list()))
> 
> now would give an error.

...which is no big loss, because already now

> factor(list(1,2,3))
Error in unique(x) : unique() applies only to vectors
> factor(list(1:3))
Error in unique(x) : unique() applies only to vectors

> I still think we should not silently allow list()s {or expression()s} as
> argument to sort() as we do now; BTW, we just return them unchanged.

Agreed. Unless someone feels a great need to generalize sort() to sort
complex structures that can only be stored in a list....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] sort(list(..)) ?
Peter Dalgaard BSA