[Rd] method dispatch conflict?
Sebastian P. Luque
spluque at gmail.com
Mon Apr 28 19:11:16 CEST 2008
Hi,
I vaguely recall this was discussed in the past, but I cannot remember
the context. The code below shows the problem:
---<---------------cut here---------------start-------------->---
R> library(stats4)
R> library(lme4)
Loading required package: Matrix
Attaching package: 'Matrix'
The following object(s) are masked from package:stats :
xtabs
Attaching package: 'lme4'
The following object(s) are masked from package:stats4 :
BIC
Warning messages:
1: In namespaceImportFrom(self, asNamespace(ns)) :
replacing previous import: cov2cor
2: In namespaceImportFrom(self, asNamespace(ns)) :
replacing previous import: update
3: In namespaceImportFrom(self, asNamespace(ns)) :
replacing previous import: xtabs
R> example
example
R> example(lmer)
lmerR> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
Error in printMer(object) :
no slot of name "status" for this object of class "table"
In addition: Warning message:
In printMer(object) :
trying to get slot "status" from an object (class "table") that is not an S4 object
---<---------------cut here---------------end---------------->---
IIUC, the problem lies in choosing the correct print method for the lmer
object. If lme4 is loaded *before* stats4, then the object is printed
without errors. This is with:
---<---------------cut here---------------start-------------->---
R> sessionInfo()
R version 2.7.0 (2008-04-22)
x86_64-pc-linux-gnu
locale:
LC_CTYPE=en_CA.UTF-8;LC_NUMERIC=C;LC_TIME=en_CA.UTF-8;LC_COLLATE=en_CA.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_CA.UTF-8;LC_PAPER=en_CA.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_CA.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] lme4_0.99875-9 Matrix_0.999375-9 lattice_0.17-6
loaded via a namespace (and not attached):
[1] grid_2.7.0
---<---------------cut here---------------end---------------->---
Cheers,
--
Seb
More information about the R-devel
mailing list