title: Group_by function not working with R markdown
body: <p>I'm trying to create a pdf from an R markdown script which says this:    </p>
  
  <pre><code> test &lt;- group_by(trials, SubjID)
   number &lt;- summarise(test, nsubj=n())
   sum(number$nsubj != 12)
  </code></pre>
  
  <p>but when I click on Knitpdf I get the following error:    </p>
  
  <pre><code>error in eval(expr,envir,enclos): could not find function "group_by" Calls: 
    &lt;Anonymous&gt;...handle-&gt;withCallingHandlers-&gt;withVisible-&gt;eval-&gt;eval Execution halted    
  </code></pre>
  
  <p>I have <code>dplyr</code> installed and it works when I send the information to the console but not when I press <code>knitPDF</code>. </p>