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

From: <jeffreys_at_rand.org>
Date: Mon, 21 Dec 2009 20:40:09 +0100 (CET)


Full_Name: Jeffrey Sullivan
Version: 2.10
OS: Mac
Submission from: (NULL) (130.154.0.250)

Sort produces different results when sorting strings with non-alphanumeric characters, depending on the operating system:

RHEL 5.2, R 2.10.0



> v <- c("1","<0",">3","2")
> Sys.setlocale("LC_COLLATE","en_US.UTF-8")
[1] "en_US.UTF-8"
> sort(v)

[1] "<0" "1" "2" ">3"

Max OS 10.5.8, R 2.10.1



> v <- c("1","<0",">3","2")
> Sys.setlocale("LC_COLLATE","en_US.UTF-8")
[1] "en_US.UTF-8"
> sort(v)

[1] "<0" ">3" "1" "2"

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 22 Dec 2009 - 11:44:42 GMT

This archive was generated by hypermail 2.2.0 : Tue 22 Dec 2009 - 13:11:13 GMT