[R] Conflicts using Rcmdr, nlme and lme4

John Fox jfox at mcmaster.ca
Fri Jan 28 14:29:43 CET 2005


Dear CG,

An addendum to my previous response: If you do decide to recompile the Rcmdr
package to eliminate the dependency on nlme, as I suggested, you'll also
have to edit the .onLoad() function in the package (which is in the file
startup.R in the source package) to remove "nlme" from the vector of
required packages.

Regards,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of CG Pettersson
> Sent: Friday, January 28, 2005 5:15 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Conflicts using Rcmdr, nlme and lme4
> 
> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list