clearNode | R Documentation |
This function removes all edges to or from the specified node in the graph.
clearNode(node, object)
node |
a node |
object |
a |
All edges to and from node
are removed. node
can be a
vector.
A new instance of the graph with all edges to and from the specified node(s) removed.
R. Gentleman
removeNode
, removeEdge
V <- LETTERS[1:4]
edL3 <- vector("list", length=4)
for(i in 1:4)
edL3[[i]] <- list(edges=(i%%4)+1, weights=i)
names(edL3) <- V
gR3 <- graphNEL(nodes=V, edgeL=edL3, "directed")
g4 <- clearNode("A", gR3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.