powered by
Prints a representation of the graph.
# S3 method for mathgraph print(x, prefix.node = if (is.character(xu)) "" else "node", ...)
an object inheriting from mathgraph which represents a mathematical graph.
a string to put in front of each node named. The default is an empty string if the nodes are character and the string "node" if they are not.
other arguments to print may be given, but are not used.
the input x is returned invisibly.
The object is printed. A `--' between nodes means an undirected edge, while a single arrow means a directed edge.
S Poetry, Patrick J. Burns, Section 13.3, Mathematical Graphs
mathgraph, names.mathgraph
mathgraph
names.mathgraph
# NOT RUN { mathgraph(~ 1:3 / 2:4) mathgraph(~ 1:3 / 2:4, dir=TRUE) jjm <- mathgraph(~ letters[1:3] * letters[2:4]) jjm names(jjm) <- LETTERS[1:9] jjm # }
Run the code above in your browser using DataLab