title: Sweave Cache packages
body: <p>I am trying to sweave a report and my problem is that every time i compile R loads the packages I use in the Report (like ggplot2, MASS, cubature..). This is very time consuming. Is there a way to chache the packages?</p>
  
  <p>I found <em>cacheSweave</em> but it does not work. </p>
  
  <p>This is the chunk i added in the sweave file:</p>
  
  <pre><code>&lt;&lt;cacheSweave, eval=TRUE, echo=FALSE, term=FALSE, cache=TRUE&gt;&gt;=
  library(cacheSweave) 
   lapply(c("ghyp","MASS","nloptr","cubature","ggplot2"), require, character.only=T)
  @
  </code></pre>
  
  <p>Thanks </p>