dot2HPD | R Documentation |
This function will read a .dot file containing a graph specification in the
DOT language, and (optionally) using two other files, convert the
information into a HivePlotData
object.
dot2HPD(
file = NULL,
node.inst = NULL,
edge.inst = NULL,
axis.cols = NULL,
type = "2D",
desc = NULL,
...
)
file |
The path to the .dot file to be processed. |
node.inst |
The path to a .csv file containing instructions about how
to map node tags in the .dot file to parameters in the |
edge.inst |
The path to a .csv file containing instructions about how
to map edge tags in the .dot file to parameters in the |
axis.cols |
A character vector giving the colors desired for the axes. |
type |
One of |
desc |
Character. A description of the data set. |
... |
Other parameters to be passed downstream. |
This function is currently agnostic with respect to whether or not the .dot
graph is directed or not. Either type will be processed, but if the graph
is directed, this will only be indirectly stored in the HivePlotData
object (in that the first node of an edge in the .dot file will be in
HPD$nodes$id1
and the second node of an edge will be in
HPD$nodes$id2
. This fact can be used; see the vignette and
mineHPD
. Keep in mind the .dot standard is fairly loose.
This function has been tested to work with several .dot files, include those
with multiple tag=value attributes (in such cases, a typical line in the dot
file should be formatted like this: node_name [tag1 = value1, tag2 =
value2];). If you have trouble, please file a issue at Github so I can
track it down.
A HivePlotData
object.
Bryan A. Hanson, DePauw University. hanson@depauw.edu
See the vignette for an example of using this function. Use
browseVignettes("HiveR")
to produce the vignette.
adj2HPD
for a means of importing adjacency matrices.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.