title: order by factor in sqldf
body: <p>As far as I can see, it is not possible to order by a factor in sqldf:</p>
  
  <pre><code>levels( iris$Species )  &lt;- c("virginica", "versicolor", "setosa")
  levels(iris$Species)
  
  &gt; sqldf(' select  distinct iris.[Species] from iris order by iris.[Species] ' )
       Species
  1     setosa
  2 versicolor
  3  virginica
  </code></pre>
  
  <p>The output above shows that sqldf() interprets Species as a character, and orders alphabetically, not by factor.</p>
  
  <p>What is an easy and safe way to work around this? </p>