title: Sort data frame by character and date columns
body: <p>I'm trying to sort a simple dataset by a character column (descending) and a date variable (ascending).</p>
  
  <pre><code>   fx_code  date    fx_spot 
  1      AUD 2000-01-31  0.6370  
  2      AUD 2000-02-29  0.6178   
  3      AUD 2000-03-31  0.6071   
  4      AUD 2000-04-28  0.5839   
  5      AUD 2000-05-31  0.5725   
  </code></pre>
  
  <p>When I run the following code</p>
  
  <pre><code>DF$date &lt;- as.Date(DF$date, format = "%Y-%m-%d")
  DF &lt;- DF[order(DF$fx_code,-DF$date),] 
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>Error in <code>-.Date</code>(DF$date) : unary - is not defined for "Date" objects</p>
  </blockquote>