[R] Conflicts using Rcmdr, nlme and lme4
John Fox
jfox at mcmaster.ca
Fri Jan 28 14:09:12 CET 2005
Dear CG,
Doug Bates has already addressed the conflict between the nlme and lme4
packages. The Rcmdr package loads a number of other packages to use
functions in them. I frankly don't recall why I need nlme, but something in
it must be used somewhere in the Rcmdr. You could get rid of the dependency
of the Rcmdr on nlme by editing the package DESCRIPTION file and recompiling
the package. The fact that I can't remember why nlme is required suggests
that removing it won't break much, so you'll probably still be able to do
what you want.
As far as I'm aware, you cannot restart the R Commander from a saved R
workspace. You can, however, proceed as follows: Close the Commander window;
close R and save the workspace; (presumably in a later session) restart R;
load the Rcmdr package via library(Rcmdr).
I hope this helps,
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