Rgraphviz and Windows
1
0
Entering edit mode
@stephane-dray-457
Last seen 7.2 years ago
Hello list, I would like to plot graph object with a windows (XP) version of R. I would like to know if someone succeeds to use Rgraphviz with Windows. If not, if there are alternatives to plot graph object. Thanks in advances, Sincerely. PS: please, could you send me an answer to my email (stephane.dray@umontreal.ca) as I am not a regular subscriber of this list. St?phane DRAY ---------------------------------------------------------------------- ---------------------------- D?partement des Sciences Biologiques Universit? de Montr?al, C.P. 6128, succursale centre-ville Montr?al, Qu?bec H3C 3J7, Canada Tel : 514 343 6111 poste 1233 E-mail : stephane.dray@umontreal.ca ---------------------------------------------------------------------- ---------------------------- Web http://www.steph280.freesurf.fr/
graph Rgraphviz graph Rgraphviz • 619 views
ADD COMMENT
0
Entering edit mode
Jeff Gentry ★ 3.9k
@jeff-gentry-12
Last seen 7.2 years ago
> I would like to plot graph object with a windows (XP) version of R. I would > like to know if someone succeeds to use Rgraphviz with Windows. If not, if > there are alternatives to plot graph object. Rgraphviz does not currently operate w/ Windows, no. The only alternative that I know of would be to not use Windows :)
ADD COMMENT
0
Entering edit mode
On Mon, 29 Sep 2003, Jeff Gentry wrote: > > I would like to plot graph object with a windows (XP) version of R. I would > > like to know if someone succeeds to use Rgraphviz with Windows. If not, if > > there are alternatives to plot graph object. > > Rgraphviz does not currently operate w/ Windows, no. The only alternative > that I know of would be to not use Windows :) Note that the graphviz utilities do build under windows and even under cygwin. So one can export R graph data to GXL, then use the gxl2dot utility of graphviz to get a dot file, then use dotty or dot to visualize. You may need to tweak the GXL to get gxl2dot to succeed with the toGXL dump. example: library(graph) example(graphNEL) cat(saveXML(toGXL(gR)),file="goo.gxl")
ADD REPLY
0
Entering edit mode
> file, then use dotty or dot to visualize. You may need > to tweak the GXL to get gxl2dot to succeed with the > toGXL dump. > > example: > > library(graph) > example(graphNEL) > cat(saveXML(toGXL(gR)),file="goo.gxl") Let me be a bit more explicit about this. if you issue the commands mentioned here, goo.gxl will have the following contents, if you are using an XML built with libxml 1.*: (see also XML2 below if you are a libxml2 user, which you can determine by running libxmlVersion() and noting the major element) <gxl> <graph id="graphNEL"> <node id="A"/> <node id="B"/> <node id="C"/> <node id="D"/> <edge id="e1" from="A" to="D"/> <edge id="e2" from="B" to="C"/> <edge id="e3" from="C" to="B"/> <edge id="e4" from="D" to="A"/> </graph> </gxl> this will not be processed by gxl2dot because it lacks an edgemode attribute in the graph node. in fact, on my machines it causes a segmentation fault to lack the edgemode attribute. so change the third record to <graph id="graphNEL" edgemode="directed"> and now gxl2dot will emit digraph graphNEL { A -> D [_gxl_id=e1]; B -> C [_gxl_id=e2]; C -> B [_gxl_id=e3]; D -> A [_gxl_id=e4]; } save that to a file and run dotty on the file, and you can reorient and modify the graph interactively. this functionality is at an early stage -- if people are finding that features of their graph objects are not properly propagated, let us know and we will try to cover the needs. --- XML2: if you have an XML package installation based on libxml2, the result will also contain a second record sadly, R::XML has emitted a defective DTD reference (it should be ), and this is flagged as a "syntax error" by gxl2dot. just remove the DOCTYPE node, you don't need it.
ADD REPLY

Login before adding your answer.

Traffic: 282 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6