From khansen at stat.berkeley.edu  Thu Jan 21 05:42:43 2010
From: khansen at stat.berkeley.edu (Kasper Daniel Hansen)
Date: Wed, 20 Jan 2010 23:42:43 -0500
Subject: [Rd] showMethods
Message-ID: <E0D26A46-C1D5-4F5A-A81E-5AE212BE3F55@stat.berkeley.edu>

There seems to be some unanticipated things happening with showMethods (as far as I can see, it is caused by getGenerics), for packages that have namespaces and has unexported methods.

Example:
library(Matrix)
showMethods(class = "dsyMatrix")

output (with a fair amount removed):

Function "isDiagonal":
 <not a generic function>

Function "isTriangular":
 <not a generic function>

These two functions are S4 methods which are not exported by Matrix.  None of them seems to have a direct method for "dsyMatrix".  Further experimentation (that I cannot recreate with the Recommended packages alone) show that even methods defined (and not exported) in packages that are imported by some other package will show up in the output above.

I would not expect this particular output, I would expect that the two functions above do not show up.  It is unclear to me what I would have expected if (say) isDiagonal actually had a method for dsyMatrix but it was not exported (I would however _prefer_ to be able to see this).

This has some impact for how I (want to) use showMethods to explore functionality in new packages, especially packages that has a huge list of dependencies.  

Kasper


[Rd] showMethods
Kasper Daniel Hansen