[R] difference in order() between Linux and Windows with mixtures of caps and normal letters
Joris DeWolf
Joris.DeWolf at cropdesign.com
Fri Jun 25 12:14:59 CEST 2004
Could anybody explain this difference in the function order() between R
under windows and R under Linux ?
It seems that under Linux the order in of character dsitinguishes
between caps and normal letters and sorts them starting with the
capitals (see below).
How can I avoid this (I mean: get the same results as I get under Windows)?
Thanks
Joris
Under Windows R 1.6.2
> mstring <- c("b","c","a","t","d")
> mstring[order(mstring)]
[1] "a" "b" "c" "d" "t"
> Mstring <- c("b","c","a","T","D")
> Mstring[order(Mstring)]
[1] "a" "b" "c" "D" "T"
the same under Linux R.1.6.2
> mstring <- c("b","c","a","t","d")
> mstring[order(mstring)]
[1] "a" "b" "c" "d" "t"
> Mstring <- c("b","c","a","T","D")
> Mstring[order(Mstring)]
[1] "D" "T" "a" "b" "c"
--
======================================================================
Joris De Wolf
CropDesign N.V.
Plant Evaluation Group
Technologiepark 3
B-9052 Zwijnaarde
Belgium
Tel. : +32 9 242 91 55
Fax : +32 9 241 91 73
======================================================================
confidentiality notice:
The information contained in this e-mail is confidential and...{{dropped}}
More information about the R-help
mailing list