m2graph: Deriving a graph from an adjacancy matrix

View source: R/graphhelpfns.R

m2graphR Documentation

Deriving a graph from an adjacancy matrix

Description

This function derives a graph object corresponding to an adjacency matrix

Usage

m2graph(adj, nodes = NULL)

Arguments

adj

square adjacency matrix with elements in {0,1}, representing a graph

nodes

(optional) labels of the nodes, c(1:n) are used by default

Value

object of class graphNEL (package ‘graph’); if element adj[i,j] equals 1, then there is a directed edge from node i to node j in the graph, and no edge otherwise

Examples

m2graph(Asiamat)

BiDAG documentation built on May 31, 2023, 6:46 p.m.

Related to m2graph in BiDAG...