Installing lme4a in R (on Mac OSX, 10.6.4)

Douglas Bates has draft chapters out for a new book lme4: Mixed-effects Modeling with R up and I was trying to play with the development version lme4a. See this post for a note on how lme4a differs from lme4. It currently cannot be installed automatically using a command like

install.packages("lme4a", repos="")

and I installed it via svn checkout following these posts. It requires the latest version of R (2.12.0), as well as at least Rcpp (from R-forge, via svn checkout; I obtained Rcpp today), and RcppArmadillo, and the packages minqa and MatrixModels, available from CRAN respositories. (RcppArmadillo is also available from CRAN respositories, but I went ahead and installed it from the Rcpp SVN repository).

Here are the steps I followed (on Mac OSX, 10.6.4)

  1. I downloaded and installed the most recent Mac binary for R, R 2.12.0.
  2. I updated all my packages in R using update.packages()
  3. I installed some dependencies for lme4a in R:
    install.packages(c("minqa", "MatrixModels"))
  4. I obtained Rcpp/RcppArmadillo and lme4 repositories via svn checkout and installed Rcpp and lme4a (all commands entered in Terminal)
    cd [your R sources directory]
    svn checkout svn://
    svn checkout svn://
    cd rcpp/pkg
    sudo R CMD INSTALL Rcpp # without sudo, I couldn't get permission to access a necessary directory
    sudo R CMD INSTALL RcppArmadillo
    cd ../..
    cd lme4/pkg
    sudo R CMD INSTALL lme4a

2 Comments on “Installing lme4a in R (on Mac OSX, 10.6.4)”

  1. Matthias says:

    Thanks for your notes!

    I have tried to follow them, but on the svn lines (2 and 3) I get “Connection refused”. Do I have to first create a repository, or do I need to have a SVN username for R-Forge? I have only used svn once for a week-long course, so I may be missing something very basic!

    • Kristine says:

      Hi there,
      I just tried running the svn commands and had no problem, so it doesn’t seem to have something to do with the R-Forge server…I don’t think you should need to create a repository or have a SVN username. Googling around, I found that perhaps it’s your server: you could try what it says here.

      Also, since I posted this, it may be that it is now easier to install Rcpp (latest version 2011-4-12) and RcppArmadillo (latest version 2011-4-4) via CRAN via install.packages(), but I haven’t checked that that will take care of the lme4a dependencies. You could give that a try, too. (But you may still need to checkout lme4a, anyway!)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s