title: Reorder factors numerically in a data frame
body: <p>I have factors from 0 to 39. Here is how they are ordered now:</p>
  
  <pre><code>&gt; levels(items$label)
   [1] "0"  "1"  "10" "11" "12" "13" "14" "15" "16" "17" "18" "19"
  [13] "2"  "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "3" 
  [25] "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "4"  "5" 
  [37] "6"  "7"  "8"  "9"
  </code></pre>
  
  <p>How do I reorder them in numeric order, for display purposes? I don't want to change the meaning of the data frame.</p>
  
  <p><em>UPDATE</em>: How do I update the original data frame, <code>items</code>, with the sorted factor, <code>labels</code>? This should not change the data frame substantively; I just want the factors to come out in the correct order in subsequent operations.</p>