title: Sort data frame by values of character string in column in R
body: <p>I have dataset like this:</p>
  
  <pre><code>    term                occ    value 
  Less Than 1 year        Yale     1
  Less Than 1 year        MIT      3
  1 Year                  Yale     2
  2 Years                 Yale     3
  2 Years                 Yale     8
  2 years                 CMU      2
  3 Years                 Yale     5
  3 years                 NYU      2
  Greater than 3 Years    NYU      5
  Greater Than 3 Years    CALTEC   4
  No Fixed Term           Yale     2
  Other                   Bu       9
  </code></pre>
  
  <p>I want a table shows counts of the numbers of records by Term. And table should be in order of Term.</p>
  
  <p>NOTE: The difference between "Years" and "years", "Than" and "than". </p>
  
  <p>The output is like this: </p>
  
  <pre><code>term                count
  Less Than 1 year      2
  1 Year                1
  2 Years               3
  3 Years               2
  Greater than 3 Years  2
  No Fixed Term         1
  Other                 1
  </code></pre>