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:
library(Rgraphviz) g<-agread("R3-12.47-2.dot") b<-str(g) 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