Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Steven McKinney


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-boun...@r-project.org on behalf of Bill Harris
Sent: Fri 12/19/2008 5:13 PM
To: r-help@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
| codaOutput 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':
|   .
|   .
| latticeExtraExtra Graphical Utilities Based on Lattice
| lme4Linear 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 gel...@stat.columbia.edu, Yu-Sung Su
|ys...@columbia.edu, Masanao Yajima
|my2...@columbia.edu, Jennifer Hill
|jh1...@columbia.edu, Maria Grazia Pittau
|gra...@stat.columbia.edu, Jouni Kerman
|jo...@kerman.com and Tian Zheng
|tzh...@stat.columbia.edu
| Maintainer:Yu-Sung Su ys...@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-classFunction to Recall Last Source File
| balance Functions to compute the balance statistics
| bayesglmBayesian generalized linear models.
| bayespolr   Bayesian Ordered Logistic or Probit Regression
| binnedplot  Binned Residual Plot
| coefplotGeneric Function for Making Coefficient Plot
| contr.bayes.ordered Contrast Matrices
| corrplotCorrelation Plot
| display Functions for Processing lm, glm, mer and polr
| Output
| fround  Formating the Rounding of Numbers
| invlogitInverse logistic function
| lalonde Lalonde Dataset
| matchingSingle 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  

Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Dirk Eddelbuettel

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

From my Debian system running the beta release of R 2.8.1:

 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


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





-- 
Three out of two people have difficulties with fractions.

__
R-help@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.


Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steven McKinney smckin...@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   texthtmllatex
|   Dyestuff  texthtmllatex   example
|   HPDinterval   texthtmllatex
|   Pastestexthtmllatex   example
|   Penicillintexthtmllatex   example
|   VarCorr-class texthtmllatex
|   VarCorr   texthtmllatex   example
|   VerbAgg   texthtmllatex   example
|   cake  texthtmllatex   example
|   cbpp  texthtmllatex   example
|   fixef texthtmllatex   example
|   lmList-class  texthtmllatex
|   lmListtexthtmllatex   example
|   lmer  texthtmllatex   example
|   mcmcsamp  texthtmllatex   example
|   mer-class texthtmllatex   example
|   merMCMC-class texthtmllatex   example
|   ranef texthtmllatex   example
|   refit texthtmllatex   example
|   sleepstudytexthtmllatex   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 

Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dirk Eddelbuettel e...@debian.org writes:

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

Dirk,

Thanks; that looks promising!

 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.

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.

 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 :)

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.

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

  xtabs

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-

__
R-help@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.


Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bill Harris bill_har...@facilitatedsystems.com writes:

 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.

 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.

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.gou...@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-

__
R-help@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.


Re: [R] Problems installing lme4 on Ubuntu

2008-12-19 Thread Dirk Eddelbuettel

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.

__
R-help@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.