Skip to content

Problems installing lme4 on Ubuntu

4 messages · Bill Harris, Dirk Eddelbuettel

#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While I'm not an R expert, I have used R on Windows XP.  Now I've moved
to Ubuntu (Intrepid), and I'm trying to configure R to work with the
Gelman and Hill _Data Analysis Using Regression and
Multilevel/Hierarchical Models_.  So far, it's not working.

I start by following the instructions for installing arm and BRugs at
<http://www.stat.columbia.edu/~gelman/bugsR/>.  At first, it kept
failing, but I kept installing more Ubuntu packages.  Finally, I
installed the science-statistics package, and things seemed to work: I
got the required packages to show up as loaded when I run library().

When I run library(arm) (FWIW, I'm using ESS in Emacs), I get

,----
| > library(arm)
| Loading required package: MASS
| Loading required package: Matrix
| Loading required package: lattice
| 
| Attaching package: 'Matrix'
| 
| 
| 	The following object(s) are masked from package:stats :
| 
| 	 xtabs 
| 
| Loading required package: lme4
| Error in dyn.load(file, DLLpath = DLLpath, ...) : 
|   function 'cholmod_start' not provided by package 'Matrix'
| Error: package 'lme4' could not be loaded
`----

even though

,----
| > library()
| Packages in library '/home/bill/R/i486-pc-linux-gnu-library/2.7':
| 
| arm                     Data Analysis Using Regression and
|                         Multilevel/Hierarchical Models
| coda                    Output analysis and diagnostics for MCMC
| Matrix                  Sparse and Dense Matrix Classes and Methods
| R2WinBUGS               Running WinBUGS and OpenBUGS from R / S-PLUS
| 
| Packages in library '/usr/lib/R/site-library':
|   .
|   .
| latticeExtra            Extra Graphical Utilities Based on Lattice
| lme4                    Linear mixed-effects models using S4 classes
| lmtest                  Testing Linear Regression Models
|   .
|   .
|
| Packages in library '/usr/lib/R/library':
| 
|   .
|   .
|   .
| 
| Warning message:
| In library() : library ?/usr/local/lib/R/site-library? contains no packages
`----

and 

,----
| > library(help = arm)
| 
| 		Information on package 'arm'
| 
| Description:
| 
| Package:       arm
| Version:       1.1-17
| Date:          2008-11-25
| Title:         Data Analysis Using Regression and
|                Multilevel/Hierarchical Models
| Author:        Andrew Gelman <gelman at stat.columbia.edu>, Yu-Sung Su
|                <ys463 at columbia.edu>, Masanao Yajima
|                <my2167 at columbia.edu>, Jennifer Hill
|                <jh1030 at columbia.edu>, Maria Grazia Pittau
|                <grazia at stat.columbia.edu>, Jouni Kerman
|                <jouni at kerman.com> and Tian Zheng
|                <tzheng at stat.columbia.edu>
| Maintainer:    Yu-Sung Su <ys463 at columbia.edu>
| Depends:       methods, R (>= 2.6.0), MASS, Matrix (>= 0.999375-10),
|                lme4 (>= 0.999375-16), R2WinBUGS
| Suggests:      car, foreign
| Description:   R functions for processing lm, glm, mer and polr
|                outputs.
| URL:           http://www.stat.columbia.edu/~gelman/software/
| License:       GPL (>= 2)
| Packaged:      Tue Nov 25 15:26:57 2008; SUYS
| Built:         R 2.7.1; ; 2008-12-17 21:31:22; unix
| 
| Index:
| 
| GO-class                Function to Recall Last Source File
| balance                 Functions to compute the balance statistics
| bayesglm                Bayesian generalized linear models.
| bayespolr               Bayesian Ordered Logistic or Probit Regression
| binnedplot              Binned Residual Plot
| coefplot                Generic Function for Making Coefficient Plot
| contr.bayes.ordered     Contrast Matrices
| corrplot                Correlation Plot
| display                 Functions for Processing lm, glm, mer and polr
|                         Output
| fround                  Formating the Rounding of Numbers
| invlogit                Inverse logistic function
| lalonde                 Lalonde Dataset
| matching                Single Nearest Neighborhood Matching
| model.matrix.bayes      Construct Design Matrices
| multicomp.plot          Multiple Comparison Plot
| rescale                 Function for Standardizing by Centering and
|                         Dividing by 2 sd's
| residual.plot           residual plot for the observed values
| se.coef                 Extract Standard Errors of Model Coefficients
| sigma.hat               Extract Residual Errors
| sim                     Functions to Get Posterior Distributions
| standardize             Function for Standardizing Regression
|                         Predictors by Centering and Dividing by 2 sd's
| traceplot               Trace plot of bugs object
| triangleplot            Triangle Plot
`----

To demonstrate that things aren't well, 

,----
| > display()
| Error: could not find function "display"
`----

Any suggestions on next steps?  The best I found in searching was that I
needed to load certain packages in Ubuntu, and I hoped I had done that
when I finally loaded science-statistics.

Thanks,

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklMRtwACgkQ3J3HaQTDvd+iTwCeNEl4fdSwndRWjg2akgRZ0uZI
4JEAn39tP8td6c+tWNMWRb4yivNPyVHx
=Y+Yn
-----END PGP SIGNATURE-----
#
On 19 December 2008 at 17:13, Bill Harris wrote:
| While I'm not an R expert, I have used R on Windows XP.  Now I've moved
| to Ubuntu (Intrepid), and I'm trying to configure R to work with the
| Gelman and Hill _Data Analysis Using Regression and
| Multilevel/Hierarchical Models_.  So far, it's not working.
| 
| I start by following the instructions for installing arm and BRugs at
| <http://www.stat.columbia.edu/~gelman/bugsR/>.  At first, it kept
| failing, but I kept installing more Ubuntu packages.  Finally, I
| installed the science-statistics package, and things seemed to work: I
| got the required packages to show up as loaded when I run library().

First off, see the R FAQ and the Ubuntu README on CRAN:
   http://cran.r-project.org/bin/linux/ubuntu/

This shows you how you can get current R binaries with just one apt-get
command.  With that, you then get to decide if you want the prebuild r-cran-*
packages (as e.g. r-cran-lme4) or whether you want to built them yourself in
R via install.packages().  In which case r-base-dev will be helpful to
install needed packages.

Either way, I have no problems with lme4 etc. or arm, see below.

Also note that there is a Debian/Ubuntu specific mailing list r-sig-debian
where you may want to subscribe.  You are likely to find more focussed help
for Ubuntu there, and we'd be glad to walk you through individual steps.
Welcome to Debian and Ubuntu :)

Regards, Dirk
Loading required package: MASS
Loading required package: Matrix
Loading required package: lattice

Attaching package: 'Matrix'


        The following object(s) are masked from package:stats :

         xtabs


        The following object(s) are masked from package:base :

         colMeans,
         colSums,
         rcond,
         rowMeans,
         rowSums

Loading required package: lme4
Loading required package: R2WinBUGS
Loading required package: coda

Attaching package: 'coda'


        The following object(s) are masked from package:lme4 :

         HPDinterval


arm (Version 1.1-17, built: 2008-11-25)
Working directory is /home/edd
options( digits =  2 )
Loading required package: car
Loading required package: foreign

Attaching package: 'arm'


        The following object(s) are masked from package:coda :

         traceplot

  
    
#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dirk Eddelbuettel <edd at debian.org> writes:
Dirk,

Thanks; that looks promising!
I tried that, but using the mirrors at fhcrc and wustl both gave me
errors when I tried to install: 

,----
| WARNING: The following packages cannot be authenticated!
|   ess r-base-core r-cran-lattice r-cran-mgcv r-cran-vr r-base r-recommended
|   r-cran-rodbc r-base-html
| Install these packages without verification [y/N]? 
`----

Is that to be expected?  I aborted the process, but, if you say that's
normal, I'll try again.
Thanks.  I'll sign up shortly.  I had used Debian some years ago in a
colinux setting, and it's truly fun to compute again now that I'm on Ubuntu.
Ah.  So, whatever that means, it must be okay. :-)


Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklMb5UACgkQ3J3HaQTDvd8ZTwCcCiP4gSaEI2eN87kmviY6qVX2
BngAn0hn56BS1fnP445VIifxguUOT4xV
=FP2i
-----END PGP SIGNATURE-----
#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Harris <bill_harris at facilitatedsystems.com> writes:
I should have said I tried the process shown on that page under SECURE
APT:

,----
| $ gpg --keyserver subkeys.pgp.net --recv-key E2A11821
| gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
| gpg: key E2A11821: "Vincent Goulet <vincent.goulet at act.ulaval.ca>" not changed
| gpg: Total number processed: 1
| gpg:              unchanged: 1
| $ gpg -a --export E2A11821 | sudo apt-key add -
| OK
`----

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklMccoACgkQ3J3HaQTDvd9CygCeLw7BSsZPghGgEoToz3zKD+D/
QA8AnjsCLqrf7cyXX11B1aBzg3FpWREJ
=qlMf
-----END PGP SIGNATURE-----