[R] Discovering methods

Gabor Grothendieck ggrothendieck at myway.com
Mon Dec 1 02:55:49 CET 2003



Thanks.  I guess we have to be content to approximate this via:

   apropos("POSIXt$|POSIXct$")

although this supposes we know that POSIXct inherits from POSIXt
and its not clear that there is a reliable way to discover that
for S3 classes.

--- 
Date: Sun, 30 Nov 2003 13:10:52 -0800 (PST) 
From: Thomas Lumley <tlumley at u.washington.edu>
To: Gabor Grothendieck <ggrothendieck at myway.com> 
Cc: <kjetil at entelnet.bo>, <R-help at stat.math.ethz.ch> 
Subject: Re: [R] Discovering methods 

 
 
On Fri, 28 Nov 2003, Gabor Grothendieck wrote:

>
>
> Sure, but why are some methods found using methods("POSIXct")
> while other methods not found?
>
> It would be nice to have some reliable documentation-independent
> way to discover all the methods for a class.

Indeed it would, but that requires registration of methods using either
the S4 approach or the functions for handling S3 methods in namespaces.

Without this, it is simply not possible to decide, for example, whether
t.test.formula is a method for t() or for t.test() or a separate function.


     -thomas




More information about the R-help mailing list