Read Graphviz file .dot in R
Entering edit mode
Last seen 5.0 years ago

I am trying to read this GraphViz file .dot in R and obtain a matrix with relevant information. After reading the file I will work on the matrix to obtain the output in specific format (I've worked a bit with matrices in R before and that is work I want and have to do). Instead of trying to parse and analyze the file from scratch, I'm trying to use an R package to speed it up. 

The file was originally a .glm file GridLab-D converted through a ruby script to DOT file by Michael A. Cohen as he expains here. I am interested in obtaining parameters, especially "pos" for every element.

The code I've tried is:


    c<-lapply(g@AgNode, function(i) i@center)

From this output I can't obtain the information from the "pos" field.

I'm willing to learn, read, look and work a new solution, hopefully with some of your expertise it will be faster.

I'm open to other packages too if you think that it could be a better solution for this particular case.

Thanks in advance.

Note: RStudio version 0.99.902 


r rstudio rgraphviz graphviz .dot • 1.2k views

Login before adding your answer.

Traffic: 189 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6