An experiment:

  sort(c("AACD","A CD"))
  #  [1] "AACD" "A CD"

  sort(c("ABCD","A CD"))
  #  [1] "ABCD" "A CD"

  sort(c("ACCD","A CD"))
  #  [1] "ACCD" "A CD"

  sort(c("ADCD","A CD"))
  #  [1] "A CD" "ADCD"

  sort(c("AECD","A CD"))
  #  [1] "A CD" "AECD"
  ## (with results for "AFCD", ... "AZCD" similar to the last two).

  LC_COLLATE=en_GB.UTF-8

(R version 2.11.0 (2010-04-22) on Linux).

So this behaves, in en_GB.UTF-8, as though " " (SPACE) is between
"C" and "D".

This is nuts!!!

Curable if I set (e.g.) LC_LOCALE="C" on startup. But what else
might break if I do so?

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 28-May-10                                       Time: 14:24:08
------------------------------ XFMail ------------------------------

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to