Re: Collating sequences are used inconsistently. (PR#289)

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: Collating sequences are used inconsistently. (PR#289)
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Wed 29 Sep 1999 - 01:13:17 EST


Message-ID: <x2905rt6gi.fsf@blueberry.kubism.ku.dk>

ripley@stats.ox.ac.uk writes:

> R 0.65.0 (and all others I have seen), Solaris 2.6.
>
> > sort(c("a", "A", "b", "B"))
> [1] "A" "a" "B" "b"
> > "a" < "B"
> [1] FALSE
>
> in the en_UK locale. I don't think it is good idea that sort and <
> have a different idea of ordering, so I rate this as a bug. As far as I can
> see sort uses strcoll and hence the locale, and < uses ASCII.

Agreed. I did a i quick runover of all uses of strcmp in the code, and it
seems that the sign only gets used in two files, relop.c (4 times)
and in gnuwin32/dynload.c. The latter one is in a binary search of the
symbol table, which I'll assume is in ASCII order...

I'll make the changes to relop.c if you haven't done so already.

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:08 EST