[R] getMethod in a setMethod context
Luke Tierney
luke at stat.uiowa.edu
Sun Mar 9 18:17:31 CET 2003
On Sun, 9 Mar 2003, Michael Mader wrote:
> Hi Laurent,
>
> what about something like
>
> setMethod("f", signature("B"),
> definition=function(obj){
> f(as(obj, "A")
> },
> where=where)
>
>
>
> Cheers
>
> Michael
>
May not be what you want if the method for "A" calls generics for
which the class of the original obj would be more relevant.
luke
--
Luke Tierney
University of Iowa Phone: 319-335-3386
Department of Statistics and Fax: 319-335-3017
Actuarial Science
241 Schaeffer Hall email: luke at stat.uiowa.edu
Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
More information about the R-help
mailing list