Dear list,
Suppose some methods were defined for a generic function genF(fitobj,
...). Suppose one has signature(fitobj="lm") and
signature(fitobj="glm"). The ... piece of each method could have
different arguments. I'm aware of getMethod("genF",
"lm") to get the
function definition but are there equivalents to the args() and body()
functions?
Thanks.
Vinh
--
Vinh Nguyen
Department of Statistics
Donald Bren School of ICS
2231 Bren Hall
University of California, Irvine
Irvine, CA 92607
vqnguyen at uci.edu | http://www.ics.uci.edu/~vqnguyen/
Schedule a meeting: http://tungle.me/VinhNguyen
On Tue, Oct 5, 2010 at 4:45 PM, Thomas Lumley <tlumley at uw.edu> wrote:> You could define > > args4<-function(generic, signature) args(getMethod(generic,signature)) > and > body4<-function(generic, signature) body(getMethod(generic,signature)) > > or use selectMethod() instead of getMethod() if you want to find > inherited methods. > > ? -thomasThanks Professor Lumley, this is sufficient.