how can I get a list of all S3-methods (of a package) such that I know which functions to include in the S3method() in the NAMESPACE-file? Maybe separated by generic=T/F. thx Meinhard Ploner Vienna
Meinhard Ploner wrote:> how can I get a list of all S3-methods (of a package) > such that I know which functions to include in the S3method() > in the NAMESPACE-file? > Maybe separated by generic=T/F. > > thx > Meinhard Ploner > ViennaSince one you does not register S3 methods (except for the Namespace file), you cannot get such a list very easily. You might want to look for function names with a dot in it and then look whether the second part of that name corresponds to a class. Uwe Ligges
> Meinhard Ploner wrote: > >> how can I get a list of all S3-methods (of a package) >> such that I know which functions to include in the S3method() >> in the NAMESPACE-file? >> Maybe separated by generic=T/F. >> thx >> Meinhard Ploner >> Vienna > > > Since one you does not register S3 methods (except for the Namespace > file), you cannot get such a list very easily. > You might want to look for function names with a dot in it and then > look whether the second part of that name corresponds to a class. > > Uwe Ligges >Thank you. Usually users "register" S3-methods prior to make libraries or is this possible only for S4 classes? Meinhard Ploner
Meinhard Ploner wrote:>> Meinhard Ploner wrote: >> >>> how can I get a list of all S3-methods (of a package) >>> such that I know which functions to include in the S3method() >>> in the NAMESPACE-file? >>> Maybe separated by generic=T/F. >>> thx >>> Meinhard Ploner >>> Vienna >> >> >> >> Since one you does not register S3 methods (except for the Namespace >> file), you cannot get such a list very easily. >> You might want to look for function names with a dot in it and then >> look whether the second part of that name corresponds to a class. >> >> Uwe Ligges >> > Thank you. > Usually users "register" S3-methods prior to make libraries or > is this possible only for S4 classes? > > Meinhard Ploner >Yes. S3 method dispatchj is solely based on the naming conventions. Uwe
>>>>> "UweL" == Uwe Ligges <ligges at statistik.uni-dortmund.de> >>>>> on Wed, 14 Jul 2004 11:25:20 +0200 writes:UweL> Meinhard Ploner wrote: >> how can I get a list of all S3-methods (of a package) >> such that I know which functions to include in the >> S3method() in the NAMESPACE-file? Maybe separated by >> generic=T/F. >> >> thx Meinhard Ploner Vienna UweL> Since one you does not register S3 methods (except for UweL> the Namespace file), you cannot get such a list very UweL> easily. You might want to look for function names UweL> with a dot in it and then look whether the second part UweL> of that name corresponds to a class. yes; and for this you can re-use some of the code the current methods() function has. It *is* doing a very related thing: Looking for all S3 methods belonging to a given class or to a given generic. Martin Maechler