title: R, How to set row names attribute as numeric from character?
body: <p>I'm new to R and would like to know how I can set attribute of row name as numeric.
  I was trying to sort data frame by row names with </p>
  
  <pre><code>df[ order(row.names(df)),]
  </code></pre>
  
  <p>and the result was like </p>
  
  <pre><code>       A    B    C    D    E
  1     13    6    4    4    3
  10    16    5    3    8    3
  100    6    4   12   14    5
  101    2   14   15    3   10
  102    5    2    2    9    5
  103    9    1   12    3   15
  104   15    1    1    8    2
  105    2   10   14    7    4
  106    6    2   10    2    9
  107    3    1    1    3   22
  108   11    4    1    6   15
  109    4   29    2    6    2
  11     6   29    1    4    1
  </code></pre>
  
  <p>I have tried </p>
  
  <pre><code>row.names(df) &lt;- attr(df, "row.names")
  row.names(df) &lt;- as.numeric(row.names(df))
  </code></pre>
  
  <p>But when I check row name again, it comes back to </p>
  
  <pre><code>[1] "character"           "vector"              "data.frameRowLabels" "SuperClassMethod"   
  </code></pre>
  
  <p>I don't know what to do.. Please help me</p>