Displaying 1 result from an estimated 1 matches for "afp9".
Did you mean:
afp
2011 Oct 16
2
Custom Sort Character and Numeric
I"m trying to do a custom sort in this order:
1) Numeric digit furthest right;
2) Alphabetical second furthest to the right;
3) Alphabetical the rest of the string beginning with the first character;
The example code I'm using is an array that follows:
/myArray <- c('AFP9','AFR9','TLQP7','AFS9','AFR8','AFP8','AFS7','TLQS8')/
The output I desire is:
/>myArray
[1] "AFS7" "AFP8" "AFR8" "AFP9" "AFR9" "AFS9" "TLQP7" TLQS8" /
What...