title: Loading packages in knitr
body: <p>There are a couple of packages that I want to use in all my chunks, but I'm not sure what a smart way to do this would be. I'm working in a .Rmd file. I've tried 
  doing something like this:</p>
  
  <pre><code>```{r packages}
  library("magrittr")
  library("dplyr")
  ```
  ```{r data, cache=TRUE, dependson="packages" }
  tab_str &lt;- "name,id
  Mike,1
  Susan,2"
  tab &lt;- read.csv(text = morfo_str)
  ```
  ```{r name, dependson="data"}
  tab %&gt;% select(name)
  ```
  </code></pre>
  
  <p>But then knitr doesn't put the chunk "data" into the cache. Is there a way
  to get knitr to cache packages, or somehow make a list of packages that are loaded in all chunks?</p>