adjacency.matrix {QPress}R Documentation

Adjacency Matrix

Description

Adjacency matrix of the directed graph.

Usage

adjacency.matrix(edges, labels = FALSE, required.groups = c(0))

Arguments

edges

an edge list

labels

add row and column labels

required.groups

which edge groups should be included?

Details

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.

Value

Returns the adjacency matrix for the directed graph.

See Also

adjacency.image

Examples

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)

[Package QPress version 0.21 Index]