title: Installing all CRAN packages that are not already installed?
body: <p>The following R commands will install all CRAN packages:</p>
  
  <pre><code>availablePackages &lt;- available.packages()[,1]
  install.packages(availablePackages)
  </code></pre>
  
  <p>And the following command will list all installed packages:</p>
  
  <pre><code>installedPackages &lt;- .packages(all.available = TRUE)
  </code></pre>
  
  <p>My question is: <b>How do I instruct R to install all CRAN packages that are not already installed?</b></p>