toDotR ignores edgeData
0
0
Entering edit mode
@altmann-michael-3022
Last seen 10.1 years ago
I am trying to display a graph using the graphviz software. When I try to use the toDotR method, edgeData are ignored. When I look at the source code for toDotR it seems like it is expecting to be able to retrieve edge attribute for the edge using edgeL(g)[[i]][j]] using edgeL(g)[[i]][ optList$edgeLabelField ]] This seems not to work. It doesn't even seem like this expression could possibly work since it ignores j. -- Michael Altmann > library(graph) > from <- c("B","D") > to <- c("C", "A") > ft <- cbind (from, to) > g <- ftM2graphNEL(ft) > edgeDataDefaults(g,"label") <- "abc" > edgeData(g,"B","C", attr="label") <- "special label" > > drawing.opts = list( edgeLabelField ="label", useDirBack=TRUE) > toDotR(g,".AS.STRING", list(), drawing.opts) [1] "digraph G {\n \"B\" ;\n \"D\" ;\n \"C\" ;\n \"A\" ;\n edge [dir=back] \"C\" -> \"B\" ;\n edge [dir=back] \"A\" -> \"D\" ;\n}\n" > sessionInfo() R version 2.7.2 (2008-08-25) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] graph_1.18.1 loaded via a namespace (and not attached): [1] cluster_1.11.11 tools_2.7.2 [[alternative HTML version deleted]]
graph graph • 661 views
ADD COMMENT

Login before adding your answer.

Traffic: 806 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