[Rd] S4 Methods dispatch

Seth Falcon sfalcon at fhcrc.org
Wed Aug 30 20:25:03 CEST 2006


"Henrik Bengtsson" <hb at stat.berkeley.edu> writes:
> I think it's more complicated than this.  First of all, is it
> mandatory for a package to be explicit about 'methods'?  Second, there
> are many packages that imports 'methods' implicitly via dependency of
> other S4 packages, .e.g see many Bioconductor packages.  Thus, for
> this to work we have to build the dependency graph, and it have to
> work across repositories.

[As I already posted, I don't think this is worth the effort, better
to just reinstall.]

But this coincides with work I've been doing on tools for package
dependency graphs.  If you're curious, read on...


allDeps <- makeDepGraph(biocReposList(), type="source", 
                        keep.builtin=TRUE, dosize=FALSE)

allDepsOnMe <- reverseEdgeDirections(allDeps)

needsMethods <- dijkstra.sp(allDepsOnMe, start="methods")

needsMethods <- needsMethods$distance[is.finite(needsMethods$distance)]

length(needsMethods)
[1] 514

table(needsMethods)
needsMethods
  0   1   2   3 
  1 130 118 265 

I won't spam the mailing list with the package names, but am happy to
make them available if anyone would really find it useful.

Bw,

+ seth



More information about the R-devel mailing list