title: order() not doing its job
body: <p>This is driving me nuts. I am trying to sort a data frame by the first row in ascendinging order using the order function. Below a minimal example:</p>
  
  <pre><code>values &lt;- c(11,10,9,8,7,6,5,4,3,2,1)
  
  labels &lt;- c("A","B","C","D","E","F","G","H","I","J","K")
  
  df &lt;- data.frame(rbind(values,labels))
  
  newdf &lt;- df[,with(df,order(df[1,]))]
  
  print(newdf)
  </code></pre>
  
  <p>I have also tried this with</p>
  
  <pre><code>newdf &lt;- df[,order(df[1,])]
  </code></pre>
  
  <p>Here is the output I'm getting</p>
  
  <pre><code>        X11 X2 X1 X10 X9 X8 X7 X6 X5 X4 X3
  values   1 10 11   2  3  4  5  6  7  8  9
  labels   K  B  A   J  I  H  G  F  E  D  C
  </code></pre>
  
  <p>Which is clearly wrong! So what is going on here?</p>