toMatrix: Convert to adjacency matrix.

View source: R/to_matrix.R

toMatrixR Documentation

Convert to adjacency matrix.

Description

Convert a DAG object from other libraries to an adjacency matrix.

Usage

toMatrix(network)

Arguments

network

A bnlearn or igraph object.

Value

An adjacency matrix representation of network.

Examples

toMatrix(bnlearn::empty.graph(LETTERS[1:6]))
toMatrix(igraph::sample_k_regular(10, 2))


cia documentation built on April 4, 2025, 5:23 a.m.