Hi all, I am having difficulties to understand how R sort strings:

If I do
R) sort(c("X.","X0B"))
[1] "X."  "X0B"

So for me, as far as lexicographic order is concerned I can add whatever to
the end, the order will remain the same, but :
R) sort(c("X.Z","X0B.Z"))
[1] "X0B.Z" "X.Z"

Can somebody give me a trick for the order to become lexicographic ?  



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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to