[R] Advice on visual graph packages

Wolfgang Huber huber at ebi.ac.uk
Wed Feb 14 00:14:05 CET 2007


Hi Jarrett,

would the coercion methods for the "graph" class, provided by the 
package of the same name at Bioconductor be useful for doing what you 
want? This is the same class that also Rgraphviz works on. Try

library("graph")
example("graphNEL-class")
as(gR, "matrix")

class ? graph
class ? graphNEL
? toGXL

There is a rich sets of methods for setting and accessing node and edge 
attributes, and it is straightforward R to convert into any other 
representation you like. See the vignette "Attributes for Graph 
Objects". I am looking at version >= 1.13.6 of the package as I write this,

  Best wishes

-- 
------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber

> Hey, all.  I'm looking for packages that are good at two things
> 
> 1) Drawing directed graphs (i.e nodes and edges), both with single  
> and double headed arrows, as well as allowing for differences in line  
> width and solid versus dashed.  Note: I've tried Rgraphviz here, but  
> have run into some problems (which seem fixable and I may go with it  
> in the end), and it doesn't satisfy need # 2 (which would be ideal if  
> there is a package that does both).
> 
> 2) Allowing a user to create a directed graph, and have some text  
> object created that can be reprocessed easily reprocessed into a  
> matrix representation, or other representation of my choosing.   I've  
> tried dynamicGraph, but it seems buggy, and continually either  
> crashes, behaves very erratically (nodes disappearing when I modify  
> edges), nor is it clear from the UI how one outputs a new graph, nor  
> how one even accesses many graph attributes.  This may be my own  
> ignorance on the latter.
> 
> Do you have any suggestions?
> 
> Thanks!
> 
> -Jarrett
> 
>



More information about the R-help mailing list