[R] Problems installing lme4 on Ubuntu

Dirk Eddelbuettel edd at debian.org
Sat Dec 20 05:19:26 CET 2008

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


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.

More information about the R-help mailing list