Skip to content
Prev 20965 / 63424 Next

sort() generic? [Re: Suspicious behaviour of sort on POSIXct ..]

On Wed, 7 Jun 2006, Martin Maechler wrote:

            
(An example BTW is a time series: the times associated with values would 
be shuffled on sorting.)
The current sort handles much more than numeric vectors.  I agree with 
reasoning, but it seems wrong to ask all those using sort() in packages
to rename their usages (conditional on R >= 2.4.0) not to be penalized.

sort() is an interface to three C functions.  It ought to be possible to 
use internal dispatch for internal sort and (not for psort or qsort), for 
which I believe the overhead would be acceptable.  I think that is 
acceptable: people who set partial or method must have read the help page.