title: R markdown Knit to HTML : Error in library(dplyr)
body: <p>I am working on R markdown script (RStudio). Individual code chunk works but when i try to Knit to HTML , it throws error as "Error in library(dplyr) : there is no package called 'dplyr' Calls:  ... withCallingHandlers -> withVisible -> eval -> eval -> library"</p>
  
  <p>code</p>
  
  <pre><code>##install library
  ```{r install pkg,include=FALSE,cache=TRUE}
  
  install.packages("kableExtra",repos = "http://cran.us.r-project.org")
  
  install.packages("dplyr", repos = "http://cran.us.r-project.org")
  
  install.packages("ggplot2", repos = "http://cran.us.r-project.org")
  
  
  ```
  
  
  
  
  ```{r setup, include=FALSE}
  
  library(knitr)
  
  library(dplyr)
  
  library(ggplot2)
  
  ```
  </code></pre>