[R] how to view the syntax of a method which is not a generic method
Sarah Holte
Sholte at fhcrc.org
Thu Mar 10 20:28:17 CET 2005
Hello - I'm trying to modify an option for the lme() or nlme() macros.
I want to write my own specification for the variance function and am
following homework problem 4, Chapter 5, page 268 of Pinheiro and Bates
book on mixed effect.
I'm up to point where I've created a new class using an existing
variance function class, varExp as a template. Next I need to write an
initialize method. The book suggests that I use the inialize method for
one of the exisiting variance functions for lme(), eg varExp.
What I want is the syntax of the initialize.varExp method so that I can
edit it to create an initialize method for my newly constructed class.
So - I tried to get the text of this method, called initialize.varExp by
using the showMethods command.
Here's what happened.
> showMethods("initialize.varExp")
Function "initialize.varExp":
<not a generic function>
So I assume that inialize.varExp is not a generic method. I also have
the following information.
> findFunction("initialize.varExp")
list()
and
> findFunction("varExp")
[[1]]
<environment: package:nlme>
attr(,"name")
[1] "package:nlme"
attr(,"path")
[1] "C:/PROGRA~1/R/rw1091/library/nlme"
So I'm guessing I somehow need to tell the showMethods command that
initialize.varExp is part of the nlme package. And now I'm stuck - any
suggestions?
Thanks so much - Sarah Holte
More information about the R-help
mailing list