[R] sort order of a character sequence is different on windose and linux (windows result)

Witold E Wolski wewolski at gmail.com
Sun Jul 6 12:32:19 CEST 2014


And here is the result when sorting the same sequence on a windows box:


> bla = read.table("xx.txt",stringsAsFactors=F)
> bla = bla[,1]
> bla[1:10]
 [1] "1000_DGFVALSK_2_run0"   "1000_DGFVALSK_2_run0"
"1000_DGFVALSK_2_run0"   "1000_DGFVALSK_2_run0"
 [5] "1000_DGFVALSK_2_run0"   "1000_DGFVALSK_2_run0"
"1001_DGGAWGTEQR_2_run0" "1001_DGGAWGTEQR_2_run0"
 [9] "1001_DGGAWGTEQR_2_run0" "1001_DGGAWGTEQR_2_run0"
> sort(bla)[1:10]
 [1] "1_AAAAAAALQAK_2_run0"  "1_AAAAAAALQAK_2_run0"
"1_AAAAAAALQAK_2_run0"  "1_AAAAAAALQAK_2_run0"
 [5] "1_AAAAAAALQAK_2_run0"  "1_AAAAAAALQAK_2_run0"
"10_AAATAEEPDPK_2_run0" "10_AAATAEEPDPK_2_run0"
 [9] "10_AAATAEEPDPK_2_run0" "10_AAATAEEPDPK_2_run0"


-- 
Witold Eryk Wolski



More information about the R-help mailing list