inEdges {graph} | R Documentation |
Computes and returns a list of all the edges in to the specified set of nodes.
inEdges(node, object)
node |
a set of nodes |
object |
a graph object |
All in edges for the set of nodes are computed. For an undirected graph this is also all the out edges.
A list with one element for each node, the values are the vector of node labels for those nodes with edges to the specified node.
R. Gentleman
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 <- new("graphNEL", nodes=V, edgeL=edL3, "directed") inEdges(c("A", "B"), gR3)