[R] Conflicts using Rcmdr, nlme and lme4

CG Pettersson cg.pettersson at evp.slu.se
Fri Jan 28 11:15:08 CET 2005


Hello all!

R2.0.1, W2k. All packages updated.

I´m heavily dependant on using mixed models. Up til´now I have used
lme() from nlme as I have been told to. Together with estimable() from
gmodels it works smooth. I also often run Rcmdr, mostly for quick
graphics.

After using Rcmdr, on reopening the R workspace all help libraries for
Rcmdr (22 !) loads, among them nlme, but not Rcmdr itself. Why? 

Now I saw on the list yesterday, that lmer() from lme4 offers better
coding possibilities for crossed random factors, it feels natural to
switch from lme() to lmer() if estimable() still works on the objects.

So I installed lme4, but got a conflict with the (auto)loaded nlme:

> library(lme4)
Loading required package: Matrix 
Loading required package: latticeExtra 
Error in fun(...) : Package lme4 conflicts with package nlme.
 To attach lme4 you must restart R without package nlme.
Error: .onLoad failed in loadNamespace for 'lme4'
Error in library(lme4) : package/namespace load failed for 'lme4'

Several questions here:

Why do all these packages autoload, and could I avoid this in some
way?
Why a conflict? Isn´t it possible to mask the conflicting parts of
nlme when loading lme4?
Why are the mixed models tools from the same author(s?) splitted
between nlme and lme4? Are there any technical reasons not to include
lmer() in nlme?

Cheers
/CG

CG Pettersson, MSci, PhD Stud.
Swedish University of Agricultural Sciences
Dep. of Ecology and Crop Production. Box 7043
SE-750 07 Uppsala




More information about the R-help mailing list