[Rd] alpha-numeric order bug (PR#3996)

Peter Kleiweg kleiweg at let.rug.nl
Wed Aug 27 19:23:06 MEST 2003


# aldus kschlauc at vt.edu :

> R is ordering alpha-numeric character strings in different ways, dependent
> on the operating system. R orders strings exactly the same on Slackware and
> Windows,
> and this ordering corresponds to SPlus. It's the RedHat that is creating the
> problem.



> Is this a RedHat problem or an R problem?


The sort order depends on environment variables. Try this:

    Sys.setlocale(category = "LC_ALL", locale = "POSIX")
    " 2" < "10"

This is explained in R. See:

    ?"<"
    ?locales

-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/



More information about the R-devel mailing list