[R] Sort a data frame according to romans

Luis Ridao Cruz Luisr at hav.fo
Tue Dec 8 14:59:26 CET 2009


R-help,

I have a data frame:

> mydata
   strata nh  Nh    Wh    fh
1       I 10  26 0.048 0.385
2      II 32  84 0.154 0.381
3     III 16  42 0.077 0.381
4      IV  4  11 0.020 0.364
5       V 10  26 0.048 0.385
7     VII 64 168 0.309 0.381
8    VIII 49 129 0.237 0.380
9      IX 22  58 0.107 0.379
91     VI  0   0 0.000 0.000

and I wish to rearrange the data are sorted according to the roman (first column):

I,II,III,IV,V,VI,VII,VIII,IX


Thanks in advance




More information about the R-help mailing list