Namespace load failed for ggplot2, DESCRIPTION failed for grid
<p>I recently removed several R packages (using remove.packages()), and re-installed their newest versions. I tried to re-install the library grid using the following syntax:</p>

<pre><code>url &lt;- "https://cran.r-project.org/src/contrib/Archive/grid/grid_0.7-4.tar.gz"
pkgFile &lt;- "grid_0.7-4.tar.gz"
download.file(url = url, destfile = pkgFile)
install.packages(pkgs=pkgFile, type="source", repos=NULL)
unlink(pkgFile)
</code></pre>

<p>I received the following warnings and errors:</p>

<pre><code>Error : Invalid DESCRIPTION file

Invalid package name.
This is the name of a base package.

See section 'The DESCRIPTION file' in the 'Writing R Extensions'
manual.

ERROR: installing package DESCRIPTION failed for package ‘grid’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/grid’
Warning in install.packages :
  installation of package ‘/Users/lindz/RNASeqVisualization/grid_0.7-4.tar.gz’ had non-zero exit status
</code></pre>

<p>It seems that grid is now part of base R, so I temporarily moved on. However, upon reinstalling the package ggplot2 using:</p>

<pre><code>install.packages("ggplot2")
</code></pre>

<p>I received the following warnings:</p>

<pre><code>Warning in install.packages :
  URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': status was '400 Bad Request'

Warning in install.packages :
  URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': status was '400 Bad Request'
Warning in install.packages :
  unable to access index for repository https://R-Forge.R-project.org/src/contrib:
  cannot download all files

Warning in install.packages :
  URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES.gz': status was '400 Bad Request'

Warning in install.packages :
  URL 'https://R-Forge.R-project.org/src/contrib/PACKAGES': status was '400 Bad Request'
Warning in install.packages :
  unable to access index for repository https://R-Forge.R-project.org/src/contrib:
  cannot download all files
Warning in install.packages :
  dependency ‘grid’ is not available
Warning in install.packages :
  unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/bin/macosx/mavericks/contrib/3.3:
  Line starting '&lt;!DOCTYPE html&gt; ...' is malformed!
Warning in install.packages :
  URL 'http://www.omegahat.net/R/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was '404 Not Found'
Warning in install.packages :
  URL 'http://www.omegahat.net/R/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository http://www.omegahat.net/R/bin/macosx/mavericks/contrib/3.3:
  cannot download all files
Warning in install.packages :
  URL 'https://R-Forge.R-project.org/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was '400 Bad Request'
Warning in install.packages :
  URL 'https://R-Forge.R-project.org/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was '400 Bad Request'
Warning in install.packages :
  unable to access index for repository https://R-Forge.R-project.org/bin/macosx/mavericks/contrib/3.3:
  cannot download all files
Warning in install.packages :
  URL 'https://www.rforge.net/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was '404 Not Found'
Warning in install.packages :
  URL 'https://www.rforge.net/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://www.rforge.net/bin/macosx/mavericks/contrib/3.3:
  cannot download all files
</code></pre>

<p>When I then ran:</p>

<pre><code>library(ggplot2)
</code></pre>

<p>I received the errors:</p>

<pre><code>Error : package ‘grid’ does not have a namespace
Error: package or namespace load failed for ‘ggplot2’
</code></pre>

<p>I am unsure what to do at this point. I have seen similar posts (<a href="https://stackoverflow.com/questions/38897652/r-error-package-grid-does-not-have-a-namespace">R error package grid does not have a namespace</a>), but their solutions do not work for mine. I do not have grid saved in my any Library, since I already de-installed it (using remove.packages()).</p>

<p>My sessionInfo() is as follows:</p>

<pre><code>R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggenealogy_0.2.0

loaded via a namespace (and not attached):
[1] rsconnect_0.4.3 tools_3.3.1 
</code></pre>

<p>Any advice would be greatly appreciated!</p>