title: Sort rows in data.table in decreasing order on string key `order(-x,v)` gives error on data.table 1.9.4 or earlier
body: <p>Let's say I have the following <code>data.table</code> in <code>R</code>:</p>
  
  <pre><code>  library(data.table)
    DT = data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9)
  </code></pre>
  
  <p>I want to order it by two columns (say columns <code>x</code> and <code>v</code>). I used this:</p>
  
  <pre><code> DT[order(x,v)] # sorts first by x then by v (both in ascending order)
  </code></pre>
  
  <p>But now, I want to sort it by <code>x</code> (in decreasing order) and have the following code:</p>
  
  <pre><code>  DT[order(-x)] #Error in -x : invalid argument to unary operator
  </code></pre>
  
  <p>Therefore, I think this error is due to the fact that <code>class(DT$x)=character</code>. Could you give me any suggestion in order to solve this issue?</p>
  
  <p>I know I can use <code>DT[order(x,decreasing=TRUE)]</code>, but I want to know the syntax to sort by several columns using both ways (some decreasing, some increasing) at the same time. </p>
  
  <p>Note that if you use <code>DT[order(-y,v)]</code> the result is ok, but if you use <code>DT[order(-x,v)]</code> there is an error. So, my question is: how to solve this error?</p>