R error on installing colorspace for ggplot2

r

I am an r newbie and would appreciate some help installing ggplot2. I am using RStudio Version 0.98.1102. Please see error below.

install.packages("ggplot2")

runs fine

library("ggplot2")

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =
vI[[i]]) : there is no package called ‘colorspace’ Error: package or
namespace load failed for ‘ggplot2’

install.packages("colorspace")

Installing package into ‘C:/Users/Jessica/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified) There is a binary version available (and
will be installed) but the source version is later: binary source
colorspace 1.2-4 1.2-5 trying URL
'…//cran.rstudio.com/bin/windows/contrib/3.1/colorspace_1.2-4.zip'
Warning in install.packages : cannot open: HTTP status was '404 Not
Found' Error in download.file(url, destfile, method, mode = "wb", …)
: cannot open URL
'…://cran.rstudio.com/bin/windows/contrib/3.1/colorspace_1.2-4.zip'
Warning in install.packages : download of package ‘colorspace’ failed

Best Solution

Looks like something is a bit messed up with the package meta-information or something in your Rstudio installation. A simple work-around to try is to just download the latest colorspace zip file from here: http://cran.r-project.org/web/packages/colorspace/index.html

Then install by running install.packages("c:/path/to/downloaded/zip/file/colorspace_1.2-5.zip")

Related Question