title: Error while knitting rmd file with ggplot
body: <pre><code>library(ggplot2) #done this multiple times, and rmd works fine!
  RIStopData&lt;-read.csv("RIStopData.csv", sep=",")
  p1 = ggplot(RIStopData, aes(x=driver_gender , y=as.numeric(stop_time)))
  p1 + geom_boxplot()
  </code></pre>
  
  <p>This gives a nice boxplot when I ran the chunk in R markdown. But when I try to export this to html using <code>knit</code> feature, R gives the following error on the second line itself:</p>
  
  <pre><code>Error in ggplot(RIStopData, aes(x=driver_gender , y=as.numeric(stop_time))) : could
  not find function "ggplot" Calls: &lt;Anonymous&gt; ... handle-&gt; withCallingHandlers -&gt;
  withVisible -&gt; eval -&gt; eval Execution halted
  </code></pre>
  
  <p>This is the boxplot I get in the markdown after running the code chunk.</p>
  
  <p><a href="https://i.stack.imgur.com/OCSin.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OCSin.png" alt="enter image description here"></a></p>