adjacency.matrix {QPress} | R Documentation |
Adjacency matrix of the directed graph.
adjacency.matrix(edges, labels = FALSE, required.groups = c(0))
edges |
an edge list |
labels |
add row and column labels |
required.groups |
which edge groups should be included? |
This function converts an edge list to an adjacency matrix
A
, following the convention that A[i,j]
represents
the impact of node j
on node i
.
Returns the adjacency matrix for the directed graph.
edges <- parse.digraph(c( "E *-> D", "D *-> C", "C -> E", "E *-> B", "B *-> A", "A -> E", "D -> B")) edges <- enforce.limitation(edges) adjacency.matrix(edges,labels=TRUE)