[R] inspect s4 methods
Douglas Bates
bates at stat.wisc.edu
Fri Oct 23 04:02:31 CEST 2009
On Thu, Oct 22, 2009 at 8:11 PM, Ista Zahn <izahn at psych.rochester.edu> wrote:
> Hi everyone,
> I'm sure this has been asked before, but I could not find the right
> search terms to find it.
>
> If I want to see what summarizing a model fit with lm() does, I can
> write "summary.lm". But what if I want to see what summarizing a model
> fit with lmer() (lme4 package) does?
>
> showMethods(summary)
> Function: summary (package base)
> object="ANY"
> object="character"
> (inherited from: object="ANY")
> object="mer"
> object="sparseMatrix"
> object="summary.mer"
>
> tells me there is a "mer" method, but "summary.mer" gives me no joy.
> How can I see what summary.mer does? Do I have to inspect the source
> code?
Actually if you had followed up with the documentation for showMethods
you would have found out.
showMethods(summary, class = "mer", include = TRUE)
More details are given in Uwe's article in issue 4 of 2006 R News
http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf
More information about the R-help
mailing list