[R] How to access source code

Martin Morgan mtmorg@n@b|oc @end|ng |rom gm@||@com
Thu Dec 8 17:26:29 CET 2022

showMethods(LGD, includeDef = TRUE) shows the implementation of all methods on the LGD generic, and can be a useful fast track to getting an overview of what is going on.

Martin Morgan

From: R-help <r-help-bounces using r-project.org> on behalf of Ivan Krylov <krylov.r00t using gmail.com>
Date: Thursday, December 8, 2022 at 11:23 AM
To: Christofer Bogaso <bogaso.christofer using gmail.com>
Cc: r-help <r-help using r-project.org>
Subject: Re: [R] How to access source code
� Thu, 8 Dec 2022 20:56:12 +0530
Christofer Bogaso <bogaso.christofer using gmail.com> �����:

> > showMethods(LGD)
> Function: LGD (package GCPM)
> this="GCPM"

Almost there! Try getMethod(LGD, signature = 'GCPM').

Not sure if this is going to work as written, but if you need to see an
S4 method definition, getMethod is the way.

Best regards,

R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]

More information about the R-help mailing list