Skip to content
Prev 40736 / 63424 Next

sort infelicity

Collation is locale-specific.  To stop problems such as that you 
encontered, where it matters 'R CMD check' uses LC_COLLATE=C (and 
documents it).  Otherwise package checks would be system-dependent, 
and maybe even user-dependent.

It really isn't a good idea to misuse examples in help files for 
regression tests, not least when the result is not system-independent.

I'm afraid the only obscurity here is why you didn't undertand basic 
facts about collation (facts which are linked to from the help page of 
sort()).  E.g.

      The collating sequence of locales such as ?en_US? is
      normally different from ?C? (which should use ASCII) and can be
      surprising.  Beware of making _any_ assumptions about the
      collation order

Please do also take note of what the posting guide asked you to do 
about obsolete versions of R.
On Sat, 9 Jul 2011, Spencer Graves wrote: