title: Order function issue - undefined columns selected
body: <p>I created a data.frame using the summaryBy function - y &lt;- summaryBy....</p>
  
  <p>While running the order function to sort it, I am getting an error..Appreciate the help!</p>
  
  <pre><code>&gt; str(y)
  'data.frame':   77 obs. of  8 variables:
   $ a           : Factor w/ 66 levels ...
   $ b: Factor w/ 16 levels ...
   $ totalPaid.m                     : num  NA NA NA NA NA ...
   $ totalPaid.s                     : num  NA NA NA NA NA ...
   $ totalPaid.c                     : num  1357 1 1 1 1 ...
   $ c.m                             : num  NA 0 1.17 0 21.43 ...
   $ c.s                             : num  NA NA NA NA NA ...
   $ c.c                             : num  1357 1 1 1 1 ...
  
  &gt; order(y$totalPaid.m)
   [1] 66 68 21 24 12 71 51 60 46 39 74 76  9 44 63 77 26 75 58 73 47 57 65 30 11 72 42 15 18 70 48 27 35 16 32 61 29 43 55 33 40 59 23 13 67 56 31 19 45 50 25 38 52 62 37 36 10 14
  [59] 22 69 28 49 54 53 64  1  2  3  4  5  6  7  8 17 20 34 41
  
  &gt; y[order(y$totalPaid.m)]
  Error in `[.data.frame`(y, order(y$totalPaid.m)) : 
    undefined columns selected
  </code></pre>