toDotWithRI

Translate a graph to "dot" including rendering information

The function takes a graph object and translates it into the dot format. All rendering information is written verbatim into the dot graph as well

Usage
toDotWithRI(graph, graph_name = NULL, subGraphList = list(), isStrict = TRUE)
Arguments
graph
An object of graph graph
graph_name
The name of the graph
subGraphList
A list of objects of class graph. Each of these is used as a subgraph in the graph. The names in the list are taken as the names of the subgraph. If a graph is to be seen as a cluster (i.e. with a box around it), its name has to start with cluster.
isStrict
Should the graph be strict
Details

Given a graph object, it is translated into the dot language so that it can be rendered using the graphviz software. In addition to plotting the graph itself, all the rendering information is being used as well.

graphRenderInfo attributes are written as an attribute list after the graph statement in dot.

nodeRendenInfo attributes are written as attribute lists after each node. If an attribute is constant across all node, a global node attribute is written instead of many individual ones.##' Newlines ##' in attributes do not lead to newlines in labels. In label, headlabel and taillabel, in order to get a newline, right justification or left justification, the two character sequences \n, \r and \l have to be written (i.e. in order to create this in R, the backslash has to be escaped in a string, that is has to be written as a double-backslash).

edgeRenderInfo attributes as written as attribute lists after each edge, unless an attribute is constant, then it is written as a global edge attribute.

In general, all attribute values are being wrapped in double-quotes, unless the attibute value start with a < and ends with a >. In this case it is taken as html content and not wrapped in double quotes (nor are contained newlines escaped).

The resulting graph in dot format is returned as a character vector.

Value

A character vector with the graph in dot format

Aliases
  • toDotWithRI
Documentation reproduced from package graph, version 1.50.0, License: Artistic-2.0

Community examples

Looks like there are no examples yet.