[R] Does order() behave differently on different platforms?
ligges at statistik.uni-dortmund.de
Fri Aug 15 19:56:02 CEST 2003
Raja Surapanani wrote:
> I am running R 1.7.1 on two platforms and it seems to me that order() behaves
> differently on them. I noticed this when a test case passed in linux but
> failed on solaris. This is the behavior on the solaris platform:
>  "sparc-sun-solaris2.8"
>>x <- c("a", "b", "c", "(d")
>  "(d" "a" "b" "c"
> This is the behavior on the linux platform:
>  "i686-pc-linux-gnu"
>  "a" "b" "c" "(d"
> Am I missing something here or is there really a difference in the way order()
> works on different platforms? Thanks for your help.
You missed to read the help page. ?sort tells us:
"The sort order for character vectors will depend on the collating
sequence of the locale in use: see Comparison."
Please follow that reference and read ?Comparison as well.
More information about the R-help