[R] How can I sort a character type vector?

Soyeon Kim yunni0731 at gmail.com
Thu Mar 11 00:05:16 CET 2010


Dear All,

I want to sort a character type vector.
the vector is
[1] 4  5  6  8  9  11 Y  1  13 15 16 20 X  2  3  10 14 19 XY 7  12 18 17 22
[25] 21

and I want to sort  1-22 X Y XY or 1-22 X XY Y.
How can I do that?

Thanks,



More information about the R-help mailing list