title: Install a local R package with dependencies from CRAN mirror
body: <p>I have built an R package, i.e. I have the mypackage.tar.gz file. This package depends on several other packages, all downloadable and installable from any CRAN mirror.</p>
  
  <p>Now I want to install this package on a system where the dependencies are not yet installed, and I would like that the dependencies will be downloaded and installed automatically when I install my package.</p>
  
  <p>I tried:</p>
  
  <pre><code>install.packages("mypackage.tar.gz",type="source",dependencies=TRUE,repos="http://a.cran.mirror")
  </code></pre>
  
  <p>but it searches for <code>mypackage.tar.gz</code> on the mirror (and obviously it does not find), while if I set <code>repos=NULL</code> it correctly tries to install the local package file (as documented), but obviously it does not find the dependencies packages.</p>
  
  <p><strong>So my question is: is there a way to perform a 'mixed' installation (local package with online dependencies) or the only way to do is to manually install all the dependencies?</strong></p>