title: Installing ggplot2 in R (v3.2.2); says it's installed but is unable to be found/used?
body: <p>I'm having trouble installing the ggplot2 package in R. According to R-studio, I have the latest version installed; this is what it says when R studio first loads:</p>
  
  <pre><code>R version 3.2.2 (2015-08-14) -- "Fire Safety"
  Copyright (C) 2015 The R Foundation for Statistical Computing
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  </code></pre>
  
  <p>I'm assuming this means I'm using the correct version. But then, when I try to install the ggplot2 package using the <em>install.packages("ggplot2")</em> command, I get the following error (had to post in pastebin because it contained links):</p>
  
  <p><a href="http://pastebin.com/deqn0vFw" rel="nofollow">http://pastebin.com/deqn0vFw</a></p>
  
  <p>It appears to be some kind of error with my internet connection (not sure how to fix it, googling didn't seem to give a concrete answer). After I got that error, I went ahead and just tried downloading the .zip file for ggplot2 from the official CRAN website. Then, in R-Studio I went ahead and went to Tools>Install Packages and just installed it from the .zip. Then, in the console it said</p>
  
  <pre><code>&gt; install.packages("C:/Users/ralei/Downloads/ggplot2_1.0.1.zip", repos = NULL, type = "win.binary")
  Installing package into ‘C:/Users/ralei/Documents/R/win-library/3.2’
  (as ‘lib’ is unspecified)
  package ‘ggplot2’ successfully unpacked and MD5 sums checked
  </code></pre>
  
  <p>But then when I call the ggplot2 library using the <em>library(ggplot2)</em> I get the error: </p>
  
  <pre><code>&gt; library(ggplot2)
  Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  </code></pre>
  
  <p>there is no package called ‘digest’</p>
  
  <p>After going ahead and installing the 'digest' package (again through the CRAN website), I got another error when I tried to load ggplot2.</p>
  
  <pre><code> &gt; library(ggplot2)
   Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
     there is no package called ‘gtable’
   Error: package or namespace load failed for ‘ggplot2’
  </code></pre>
  
  <p>Can anybody explain to me what I'm doing wrong?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: This was marked as a duplicate to a "what to do if your package isn't available" error question but I don't see how my question is a duplicate of that  -- I'm not getting the "package is unavailable" error since I can install it manually, but it seems that when I install ggplot2, the installation doesn't seem to 'stick'.</p>