Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

adjMatrix

Adjacency matrix of a graph


Description

Transforms the “edge matrix” of a graph into the adjacency matrix.

Usage

adjMatrix(A)

Arguments

A

a square matrix representing the edge matrix of a graph.

Details

Given the edge matrix A of a graph, this can be transformed into an adjacency matrix E with the formula E = (A-I)^T.

Value

E

the adjacency matrix of the graph.

Author(s)

Giovanni M. Marchetti

See Also

Examples

amat <- DAG(y ~ x+z, z~u+v)
E <- edgematrix(amat)
adjMatrix(E)

ggm

Graphical Markov Models with Mixed Graphs

v2.5
GPL-2
Authors
Giovanni M. Marchetti, Mathias Drton, Kayvan Sadeghi
Initial release
2020-02-014

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.