You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just mentioning methods(class = class(.)) in an e-mail advice on R-help.
I've advertized this in my intermediate-to-advanced R teaching as a way to help users get familiar with what they can do some
(in statistics) model fit or similar.
Note that methods(class=*) is even not at all perfect (as it only finds methods for the exact class signature, but not those from parent classes which also apply).
When S7 becomes "main stream" we'd be happy to instrument utils::methods() to also work for S7 classes, but that's definitely for later, and I think we should provide the functionality within S7.
The text was updated successfully, but these errors were encountered:
Might be tricky since the methods are stored on the generics, not in some global table. The output of methods(class=) has always been a little misleading, because it doesn't account for "intrinsically generic" functions that work on an object without dispatch (by delegating to generics).
Well, yes, we'd have to loop over all generics (and consider caching the result (in a later iteration)).
I'm really arguing that methods(class = *) is already very useful to help users get a grasp about a say a model fit object which they are newly using.
{Can you give examples of "intrinsically generic"? Do you mean primitive generics or generics that belong to GroupGenerics?}
Sorry by intrinsically generic, I mean ordinary functions that delegate to generics or other polymorphic functions. Basically, polymorphism via delegation. An example is order(). It delegates to xtfrm() to achieve polymorphism, but it is not itself generic (for obvious reasons).
I was just mentioning
methods(class = class(.))
in an e-mail advice on R-help.I've advertized this in my intermediate-to-advanced R teaching as a way to help users get familiar with what they can do some
(in statistics) model fit or similar.
Note that
methods(class=*)
is even not at all perfect (as it only finds methods for the exact class signature, but not those from parent classes which also apply).When S7 becomes "main stream" we'd be happy to instrument
utils::methods()
to also work for S7 classes, but that's definitely for later, and I think we should provide the functionality within S7.The text was updated successfully, but these errors were encountered: