[Rd] showMethods

From: Kasper Daniel Hansen <khansen_at_stat.berkeley.edu>
Date: Wed, 20 Jan 2010 23:42:43 -0500


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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 21 Jan 2010 - 04:46:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Jan 2010 - 04:50:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive