Learn R Programming

BCDAG (version 1.1.2)

as_graphNEL: Transform adjacency matrix into graphNEL object

Description

Function to transform an adjacency matrix into a graphNEL object.

Usage

as_graphNEL(DAG)

Value

A graphNEL object

Arguments

DAG

Adjacency matrix of a DAG

Examples

Run this code
# Randomly generate DAG
q <- 4; w = 0.2
set.seed(123)
DAG <- rDAG(q,w)
as_graphNEL(DAG)

Run the code above in your browser using DataLab