Consider the following:
"16D" < "7A"
returns TRUE.
Why is this and how can I compare character strings like this so that the number is compared first and then the letter? So the answer will be false because 16> 7 and D> A?
Can you adapt this?
library("gtools") (m <- mixedorder(c("16D","7A"))) ## [1] 2 1 m[1] < m[2] ## FALSE