powered by
Reduce a graph to have unique node names
graphreduce(graph, separator)
graph object of class loongraph
graph of class loongraph
one character that separates the spaces in node names
Note this is a string based operation. Node names must not contain the separator character!
G <- completegraph(nodes=LETTERS[1:4]) LG <- linegraph(G) LLG <- linegraph(LG) R_LLG <- graphreduce(LLG)
Run the code above in your browser using DataLab