The editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

Question: Read Graphviz file .dot in R
gravatar for pleaseteachmehowtodoit
2.7 years ago by

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 


rgraphviz R rstudio graphviz .dot • 786 views
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by pleaseteachmehowtodoit0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 254 users visited in the last hour