title: r update.packages() not updating packages that are imported by other packages
body: <p>I recently updated to R 3.5.1 from 3.4.3.  I updated my packages as follows:</p>
  
  <p>(a) copied packages from my old library into my new library (taking care not to overwrite the base packages)</p>
  
  <p>(b) ran <code>update.packages(ask = FALSE, dependencies = TRUE)</code></p>
  
  <p>I found that a number of packages didn't install where they were listed as imports of other packages as they had 'been created with an r version with different internals, and needs to be reinstalled'.</p>
  
  <p>Somewhat frustratingly, this message seemed to be iterating through some hidden list of associated or linked packages but only telling me there was a problem for one package at a time; i.e. I would install the package that had the wrong version, then try reinstalling the package it had blocked from installing, only to get the error repeated for a different package.  I had to go through this multiple times until there were no more incorrect-version associated packages and finally the package I needed to use could be installed / updated.</p>
  
  <p>Also - I note that some packages were installed from source (these were frequently but not exclusively the ones that caused the 'different internals' error for associated packages above).  I do have Rtools installed so not a problem for me but just an observation as update.packages was doing this every time it encountered a source version that was more up to date than a windows binary (I have a windows 10 PC).</p>
  
  <p>I conclude from all this that <code>update.packages</code> skipped a lot of packages and did not in fact update them for some reason?  I'm still finding packages that did not update.</p>
  
  <p>For example:</p>
  
  <pre><code>&gt; DescTools::Gmean(x)
  Error: package ‘expm’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
  </code></pre>
  
  <p>Looking at the CRAN entry for <code>DescTools</code> <a href="https://cran.r-project.org/web/packages/DescTools/index.html" rel="nofollow noreferrer">here</a> indicates that the package <code>expm</code> is not a dependency but is imported.</p>
  
  <p>However <code>?import.packages</code> says of the <code>dependencies</code> argument:</p>
  
  <blockquote>
    <p>dependencies: </p>
    
    <p>logical indicating whether to also install uninstalled
    packages which these packages depend on/link to/import/suggest (and so
    on recursively). Not used if repos = NULL. Can also be a character
    vector, a subset of c("Depends", "Imports", "LinkingTo", "Suggests",
    "Enhances").</p>
    
    <p>Only supported if lib is of length one (or missing), so it is
    unambiguous where to install the dependent packages. If this is not
    the case it is ignored, with a warning.</p>
    
    <p>The default, NA, means c("Depends", "Imports", "LinkingTo"). TRUE
    means to use c("Depends", "Imports", "LinkingTo", "Suggests") for pkgs
    and c("Depends", "Imports", "LinkingTo") for added dependencies: this
    installs all the packages needed to run pkgs, their examples, tests
    and vignettes (if the package author specified them correctly).</p>
    
    <p>In all of these, "LinkingTo" is omitted for binary packages.</p>
  </blockquote>
  
  <p>This implies that <code>update.packages(...dependencies = TRUE)</code> <em>should</em> have also updated and / or installed all packages imported by other packages as well.</p>
  
  <p>What am I missing? </p>