[R] Sorting strings

Rui Barradas rui1174 at sapo.pt
Mon Feb 20 16:15:49 CET 2012


Hello,


statquant2 wrote
> 
> Ok so it changed from 2.12.2 to 2.14.1 ??
> Can somebody tell me how to modify my sort or whatever to get the save
> resilt that I would get in 2.14.1 ?
> 
> Cheers
> 

I don't know about 2.12.2 but for 2.12.0 I get:

> R.version
               _                            
platform       i386-pc-mingw32              
arch           i386                         
os             mingw32                      
system         i386, mingw32                
status                                      
major          2                            
minor          12.0                         
year           2010                         
month          10                           
day            15                           
svn rev        53317                        
language       R                            
version.string R version 2.12.0 (2010-10-15)
> sort(c("X.","X0B"))
[1] "X."  "X0B"
> sort(c("X.Z","X0B.Z")) 
[1] "X.Z"   "X0B.Z"

And the same for 2.14.1:

> R.version
               _                            
platform       i386-pc-mingw32
[... deleted...]
version.string R version 2.14.1 (2011-12-22)
> sort(c("X.","X0B"))
[1] "X."  "X0B"
> sort(c("X.Z","X0B.Z")) 
[1] "X.Z"   "X0B.Z"

Could it be OS related?

Rui Barradas.

--
View this message in context: http://r.789695.n4.nabble.com/Sorting-strings-tp4403696p4404267.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list