From edd at debian.org  Mon Nov 19 16:54:22 2007
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 19 Nov 2007 09:54:22 -0600
Subject: [Rd] More Rgraphviz help needed (Was: package installation order)
In-Reply-To: <m2lk90kts5.fsf@userprimary.net>
References: <71257D09F114DA4A8E134DEAC70F25D30A2029AA@groamrexm03.amer.pfizer.com>
	<18235.3307.38745.255091@ron.nulle.part>
	<m2lk90kts5.fsf@userprimary.net>
Message-ID: <18241.45486.784639.457624@ron.nulle.part>


On 14 November 2007 at 20:38, Seth Falcon wrote:
| Dirk Eddelbuettel <edd at debian.org> writes:
| > When trying to package the by-now-gargantuan Rmetrics for Debian (which is
| > still ongoing), I looked around for some Depends builders. Turns out that
| > BioC has this.   E.g. the following worked for:
| >
| > ## > install.packages("Biobase", repo="http://www.bioconductor.org")
| > ## > repos <- Biobase:::biocReposList()
| > ## > install.packages("pkgDepTools", repos=repos["bioc"])
| > ## > library(pkgDepTools)
| > ## Loading required package: graph
| > ## Loading required package: RBGL
| > ## > CRANdeps <- makeDepGraph(repos["cran"], type="source")
| > ## > getInstallOrder("Rmetrics", CRANdeps, needed.only=FALSE)
| >
| > worked for me.  I meant to add some code for Graphviz visualization (or look
| > for it, Seth et al probably already wrote it) but what you get from
| > getInstallOrder() should suit your needs here.
| 
| makeDepGraph returns a graphNEL instance and Rgraphviz knows how to
| plot those.  The entire graph will likely not produce a particularly
| compelling visualization.  But you can subset the graph according to a
| particular package's dependencies, etc.

Yes indeed!!  That was pretty straightforward just by following some code
inside getInstallOrder. And using "twopi" is good enough for the 40-some
packages in the graph.

But now I need the icing on the cake:  Given such a dependency graph, how can
I color further subgraphs according to some criterion: I'd love to select a
sub-list (of, say, new packages, or of packages that satisfy some other
criterion) and have their node plotted in a different color.   The help pages
clearly indicate that this should be possible, but they are also a little
terse on how one would do this...   Any pointers anywhere?

Dirk

-- 
Three out of two people have difficulties with fractions.



[Rd] More Rgraphviz help needed (Was: package installation order)
Dirk Eddelbuettel