This may just be version incompatibilities. A similar discussion recently transpired on r-sig-mixed-models, see e.g. https://stat.ethz.ch/pipermail/r-sig-mixed-models/2008q4/001526.html HTH Steven McKinney Statistician Molecular Oncology and Breast Cancer Program British Columbia Cancer Research Centre email: smckinney +at+ bccrc +dot+ ca tel: 604-675-8000 x7561 BCCRC Molecular Oncology 675 West 10th Ave, Floor 4 Vancouver B.C. V5Z 1L3 Canada -----Original Message----- From: r-help-bounces at r-project.org on behalf of Bill Harris Sent: Fri 12/19/2008 5:13 PM To: r-help at r-project.org Subject: [R] Problems installing lme4 on Ubuntu -----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----- ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Problems installing lme4 on Ubuntu
3 messages · Steven McKinney, Bill Harris, Dirk Eddelbuettel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 "Steven McKinney" <smckinney at bccrc.ca> writes:
This may just be version incompatibilities. A similar discussion recently transpired on r-sig-mixed-models, see e.g. https://stat.ethz.ch/pipermail/r-sig-mixed-models/2008q4/001526.html
Steven,
That did sound promising. I ran
,----
| sudo R CMD REMOVE -l /usr/lib/R/site-library/ lme4
`----
and the files disappeared.
Then I ran
,----
| > install.packages("lme4")
`----
- From inside R, selected a mirror in WA (USA), and let it run. I got
,----
| trying URL 'http://cran.fhcrc.org/src/contrib/lme4_0.999375-28.tar.gz'
| Content type 'application/x-gzip' length 678443 bytes (662 Kb)
| opened URL
| ==================================================
| downloaded 662 Kb
|
| * Installing *source* package 'lme4' ...
| ** libs
| gcc -std=gnu99 -I/usr/share/R/include -I"/home/bill/R/i486-pc-linux-gnu-library/2.7/Matrix/include" -fpic -g -O2 -c init.c -o init.o
| gcc -std=gnu99 -I/usr/share/R/include -I"/home/bill/R/i486-pc-linux-gnu-library/2.7/Matrix/include" -fpic -g -O2 -c lmer.c -o lmer.o
| gcc -std=gnu99 -I/usr/share/R/include -I"/home/bill/R/i486-pc-linux-gnu-library/2.7/Matrix/include" -fpic -g -O2 -c local_stubs.c -o local_stubs.o
| gcc -std=gnu99 -shared -o lme4.so init.o lmer.o local_stubs.o -llapack -lblas -lgfortran -lm -L/usr/lib/R/lib -lR
| ** R
| ** data
| ** moving datasets to lazyload DB
| ** inst
| ** preparing package for lazy loading
| Loading required package: Matrix
| Loading required package: lattice
|
| Attaching package: 'Matrix'
|
|
| The following object(s) are masked from package:stats :
|
| xtabs
|
| Creating a new generic function for "coef" in "lme4"
| Creating a new generic function for "confint" in "lme4"
| Creating a new generic function for "plot" in "lme4"
| Creating a new generic function for "formula" in "lme4"
| Creating a new generic function for "anova" in "lme4"
| Creating a new generic function for "deviance" in "lme4"
| Creating a new generic function for "fitted" in "lme4"
| Creating a new generic function for "logLik" in "lme4"
| Creating a new generic function for "predict" in "lme4"
| Creating a new generic function for "residuals" in "lme4"
| Creating a new generic function for "resid" in "lme4"
| Creating a new generic function for "simulate" in "lme4"
| Creating a new generic function for "model.frame" in "lme4"
| Creating a new generic function for "model.matrix" in "lme4"
| Creating a new generic function for "terms" in "lme4"
| Creating a new generic function for "vcov" in "lme4"
| Creating a new generic function for "with" in "lme4"
| Creating a new generic function for "as.data.frame" in "lme4"
| Creating a new generic function for "xyplot" in "lme4"
| Creating a new generic function for "densityplot" in "lme4"
| Creating a new generic function for "qqmath" in "lme4"
| ** help
| >>> Building/Updating help pages for package 'lme4'
| Formats: text html latex example
| BIC text html latex
| Dyestuff text html latex example
| HPDinterval text html latex
| Pastes text html latex example
| Penicillin text html latex example
| VarCorr-class text html latex
| VarCorr text html latex example
| VerbAgg text html latex example
| cake text html latex example
| cbpp text html latex example
| fixef text html latex example
| lmList-class text html latex
| lmList text html latex example
| lmer text html latex example
| mcmcsamp text html latex example
| mer-class text html latex example
| merMCMC-class text html latex example
| ranef text html latex example
| refit text html latex example
| sleepstudy text html latex example
| ** building package indices ...
| * DONE (lme4)
|
| The downloaded packages are in
| /tmp/RtmpZmO6Lb/downloaded_packages
| > display()
| Error: could not find function "display"
`----
The two unexpected things were the fact it seemed to load Matrix after
getting lme4 -- did that mess anything up? -- and "The following
object(s) are masked from package:stats : xtabs" statement, which seemed
odd but I don't know what it means.
Did I misunderstand something?
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)
iEYEARECAAYFAklMbCwACgkQ3J3HaQTDvd8J3ACfeqC34KAip6FjwfadlAcgH3gK
PyEAniLW19bO/XetmDq9v4VzlMuM/StV
=ICba
-----END PGP SIGNATURE-----
On 19 December 2008 at 19:53, Bill Harris wrote:
| That did sound promising. I ran
|
| ,----
| | sudo R CMD REMOVE -l /usr/lib/R/site-library/ lme4
| `----
|
| and the files disappeared.
Still not a good idea. See /etc/R/Renviron -- the directory
/usr/lib/R/site-library is used by your Ubuntu R/CRAN packages. As you
installed them via apt-get / aptitude / ... you should uninstall them via the
package management system. R and Ubuntu and somewhat unaware of their
respective package systems.
So your Ubuntu system now thinks it has files below
/usr/lib/R/site-library/lme4/ when it really doesn't anymore. This can lead
to inconsistent bahviour. You could just re-install the Ubuntu version, and
then remove it, or you could leave it as it is.
As a general rule, files below /usr/local or /opt or /home are yours,
everything else is done via the package management system.
| Then I ran
|
| ,----
| | > install.packages("lme4")
| `----
|
| - From inside R, selected a mirror in WA (USA), and let it run. I got
You can also hardwire a mirror via ~/.Rprofile and a line like
options("repos"=c(CRAN="http://cran.us.r-project.org"))
which selects the same Fred Hutch. mirror too.
| ,----
| | trying URL 'http://cran.fhcrc.org/src/contrib/lme4_0.999375-28.tar.gz'
| | Content type 'application/x-gzip' length 678443 bytes (662 Kb)
| | opened URL
| | ==================================================
| | downloaded 662 Kb
| |
| | * Installing *source* package 'lme4' ...
| | ** libs
[...]
That's what I suggested in my last email too.
| | > display()
| | Error: could not find function "display"
| `----
|
| The two unexpected things were the fact it seemed to load Matrix after
| getting lme4 -- did that mess anything up? -- and "The following
Normal -- that is what the Depends: the DESCRIPTION file for lme4 imples.
| object(s) are masked from package:stats : xtabs" statement, which seemed
| odd but I don't know what it means.
Normal warning telling you that the xtabs function are masked. Not to worry.
Hope this helps, Dirk
Three out of two people have difficulties with fractions.