I want to call summary on a mer object (from lme4) within my package
but I can't seem to get the namespace to import the necessary method.
I've simplified my package to this one function:
---------------------------
ss <- function(m) {
summary(m)
}
---------------------------
And my namespace file looks like this, where I've attempted to follow
the instructions in "Writing R Extensions"
http://cran.r-project.org/doc/manuals/R-exts.html#Name-spaces-with-S4-classes-and-methods
---------------------------
import(lme4)
importMethodsFrom(lme4, "summary")
export("ss")
---------------------------
But when I call my new function, I get the summary.default method
instead of the mer method.
> m <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
> ss(m)
Length Class Mode
1 mer S4
Thanks,
--
Aaron Rendahl, Ph.D.
Statistical Consulting Manager
School of Statistics, University of Minnesota
NEW OFFICE (as of June 2009):
48C McNeal Hall, St. Paul Campus
612-625-1062
www.stat.umn.edu/consulting
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.