dot2HPD: Process a .dot graph file into a HivePlotData object
Description
This function will read a .dot file containing a graph specification in the DOT language, and using two other files, convert the information into a HivePlotData
object.Usage
dot2HPD(file = NULL, node.inst = NULL, edge.inst = NULL, axis.cols = NULL,
type = "2D", desc = NULL, ...)
Arguments
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 HivePlotData
object. May be NULL.
edge.inst
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.
axis.cols
A character vector giving the colors desired for the axes.
type
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
desc
Character. A description of the data set.
...
Other parameters to be passed downstream.
Details
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. If you have trouble, please file a issue at Github so I can track it down.References
http://academic.depauw.edu/~hanson/HiveR/HiveR.htmlSee Also
See the vignette for an example of using this function. Use > vignette("HiveR")
to produce the vignette.
adj2HPD
for a means of importing adjacency matrices.