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,
...
)
A HivePlotData
object.
The path to the .dot file to be processed.
The path to a .csv file containing instructions about how
to map node tags in the .dot file to parameters in the HivePlotData
object. May be NULL.
The path to a .csv file containing instructions about how
to map edge tags in the .dot file to parameters in the HivePlotData
object. May be NULL.
A character vector giving the colors desired for the axes.
One of c("2D", "3D")
. If 2D
, a
HivePlotData
object suitable for use with plotHive
will
be created and the eventual hive plot will be static and 2D. If 3D
,
the HivePlotData
object will be suitable for a 3D interactive plot
using plot3dHive
.
Character. A description of the data set.
Other parameters to be passed downstream.
Bryan A. Hanson, DePauw University. hanson@depauw.edu
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.
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.