I have a data frame with over 1000 rows.
1   chr1    23373262    23390014    NM_001081079    -   Ogfrl1
10  chr1    43807075    43884553    NM_026430   -   Uxs1
100 chr10   77069342    77081076    NM_001301671    +   Sumo3
1000    chr5    137736931   137748902   NM_031405   -   Srrt
1001    chr5    137737851   137737916   NR_106003   -    
1002    chr5    137751126   137755469   NM_011639   -   Trip6
1003    chr5    137755785   137774810   NM_031406   -   Slc12a9
1004    chr5    138220145   138221335   NM_027242   +   Ppp1r35
1005    chr5    138223133   138227929   NM_144913   -   Mepce
1006    chr5    138229029   138263849   NM_001005426    +   Zcwpw1
I want to sort them by row.names, which the the number in the first column above. My command is
mef_genes<-mef_genes[sort(as.integer(row.names(mef_genes)),decreasing=F),]
Its ranked as shown above. I want to rank like normally ascending, i.e 1,2,3... Can anyone tell me how to do it? Thank you very much
 
    