title: R - SQL query with R-Base functions and clause HAVING
body: <p>I am using library <code>nycflights13</code>. How to output results of following query: </p>
  
  <pre><code>SELECT engine, COUNT(*) FROM planes WHERE seats &gt; 300 GROUP BY engine HAVING COUNT(*) &gt; 20
  </code></pre>
  
  <p>but <code>WITHOUT</code> external library? (I know how to do it with <code>dplyr</code> or <code>sqldf</code>). Only <code>R-Base</code> function?</p>