mat2UndirG: Change graph representations

Description Usage Arguments Details Value Author(s) References Examples

View source: R/mat2UndirG.R

Description

A function to turn an adjacency matrix for a graph into a graphNEL object.

Usage

1
mat2UndirG(V, mat)

Arguments

V

A vector of node names

mat

A square symmetric matrix indicating the presence of edges

Details

mat is a square matrix with rows and columns corresponding to nodes in the graph. Entries of "0" indicate the lack of an edge. Since this is making an undirected graph, mat must be symmetric.

Value

A graphNEL object.

Author(s)

Denise Scholtens

References

Balasubramanian, et al. (2004) A graph theoretic approach to integromics - integrating disparate sources of functional genomics data.

Examples

1
2
3
library(graph)
a <- matrix(c(0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0),ncol=4)
ag <- mat2UndirG(V=letters[1:4],mat=a)

GraphAT documentation built on Nov. 8, 2020, 5:01 p.m.

Related to mat2UndirG in GraphAT...