loon (version 1.3.3)

graphreduce: Make each space in a node apprear only once

Description

Reduce a graph to have unique node names

Usage

graphreduce(graph, separator)

Arguments

graph

graph of class loongraph

separator

one character that separates the spaces in node names

Value

graph object of class loongraph

Details

Note this is a string based operation. Node names must not contain the separator character!

Examples

Run this code
# NOT RUN {
G <- completegraph(nodes=LETTERS[1:4])
LG <- linegraph(G)

LLG <- linegraph(LG)

graphreduce(LLG)

if (requireNamespace("Rgraphviz", quietly = TRUE)) {
  plot(graphreduce(LLG))
}

# }

Run the code above in your browser using DataLab