Re: [Rd] sort yields different results on OS X (PR#14163)

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Tue, 22 Dec 2009 13:59:54 +0100

Prof Brian Ripley wrote:

>
> That different OSes use the same name for a locale does not make them
> the same locale.
>
> Note that R can be compiled to use ICU, which provides a well-considered
> collation suite. R on Mac OS X uses ICU, as does a Linux build if it is
> available -- so I would say that it is RHEL that is out of line here (it
> makes little sense to have < and > far apart in the collation sequence).
>

That's not it:

 > v <- c("1","<0","<3","2")
 > sort(v)
[1] "<0" "1" "2" "<3"

The point is rather that "special characters" are ignored during collation.

Apparently, this comes from /usr/share/i18n/locales/iso14651_t1_common on Fedora; I wouldn't know how faithful to the ISO standard that is.

-- 
    O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 22 Dec 2009 - 13:02:55 GMT

This archive was generated by hypermail 2.2.0 : Tue 22 Dec 2009 - 18:21:23 GMT