Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems installing Ime4 and ggplot2 on R 2.15.2

Tags:

r

ggplot2

lme4

I am having difficulty installing the lme4 and ggplot packages

I've tried to install them by selecting a CRAN mirror (have tried several) and then selecting the packages, and have also tried the following;

install.packages("lme4",repos="http://r-forge.r-project.org")

and

install.packages("ggplot2", dependencies=TRUE)

but however I try to call these packages I get the warning message

package ‘lme4’ is not available (for R version 2.15.2)

or

package ‘ggplot2’ is not available (for R version 2.15.2)

the only answers I can find for problems installing these packages suggest upgrading R to the latest version, but I am using 2.15.2 which I believe is the most recent available.

Has anyone else had this problem?

Any help would be greatly appreciated!!

thanks.

Lian

like image 355
Lian Thomas Avatar asked Feb 02 '13 16:02

Lian Thomas


1 Answers

I was having the exact same problem. Here is what solved it for me:

For convenience I added a default cran mirror in my Rprofile.site file:

local({r <- getOption("repos")
   r["CRAN"] <- "http://cran.stat.sfu.ca/"
   options(repos=r)})

Then installing packages in this order works:

install.packages("Matrix")
install.packages("nlme")
install.packages("minqa")
install.packages("RcppEigen")
install.packages("lme4",repos="http://lme4.r-forge.r-project.org/repos")
install.packages("ggplot2", dependencies=TRUE)

Hope it works for you as well.

like image 89
Christopher Poile Avatar answered Sep 28 '22 00:09

Christopher Poile