I am just finding some unexpected behavior in gtools::mixedsort looking at how my outputs are supposedly naturally sorted.
I have an example like this:
aa=c("CD57","CD58","CD158","CD158b","CD158e","CD158e1","CD319","CD335")
gtools::mixedsort(aa)
My expected result would be:
[1] "CD57" "CD58" "CD158" "CD158b" "CD158e" "CD158e1" "CD319"
[8] "CD335"
However I obtain this:
[1] "CD57" "CD58" "CD158" "CD158b" "CD158e" "CD319" "CD335"
[8] "CD158e1"
Is this correct? What is the reason?