inEdges {graph}R Documentation

inEdges

Description

Computes and returns a list of all the edges in to the specified set of nodes.

Usage

inEdges(node, object)

Arguments

node a set of nodes
object a graph object

Details

All in edges for the set of nodes are computed. For an undirected graph this is also all the out edges.

Value

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.

Author(s)

R. Gentleman

See Also

removeNode, clearNode

Examples


  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)


[Package graph version 1.8.0 Index]