[R] Accessing methods and extending S4 classes of existing packages

Johannes Huesing johannes at huesing.name
Sun Jun 29 20:17:17 CEST 2008

Johannes Huesing <johannes at huesing.name> [Sun, Jun 29, 2008 at 08:13:27AM CEST]:
> Dear all,
> I am trying to understand how to access S4 methods after loading a 
> package, using the online documentation of getMethod and friends.
> This is what I have been trying:
> > library(coin)
> > findMethods("ApproxNullDistribution")
> list()
> Warning message:
> In findMethods("ApproxNullDistribution") :
>   nicht-generische Funktion an findMethods() übergeben
> whereas in the source of coin I can see the lines: 
> setGeneric("ApproxNullDistribution", function(object, ...)
>     standardGeneric("ApproxNullDistribution"))
> It seems that I am not getting what is going on here. Could anybody
> give me a hint?

It seems like the package authors chose not to export the ApproxNullDistribution
generic method from the package, as seen in the NAMESPACE file of the 

Does it mean that if I want to write personal extensions to the package,
the correct approach is to take the whole package and modify it?
Johannes Hüsing               There is something fascinating about science. 
                              One gets such wholesale returns of conjecture 
mailto:johannes at huesing.name  from such a trifling investment of fact.                
http://derwisch.wikidot.com         (Mark Twain, "Life on the Mississippi")

More information about the R-help mailing list