

Add or remove edges
Source: R/transform.R
Description
add_edges() and remove_edges() return a new graph of the same class with the edges described by ... added or removed, using the operators documented at edge-operators (e.g. B %-->% C, C %-->% D); any isolated-node declarations in ... are ignored. remove_edges() errors if an edge in ... is not present in cg. For programmatic use, pass a spec string via spec instead of ....
Usage
add_edges(cg, ..., spec = NULL)
remove_edges(cg, ..., spec = NULL)Arguments
cg
|
A graph created with cgraph(), of any class.
|
...
|
Edge expressions; see edge-operators. Mutually exclusive with spec.
|
spec
|
Edge specification string, for programmatic use. Mutually exclusive with ....
|
Value
A cgraph.