essgraph2amat: Convert essential graph to adjacency matrix

View source: R/misc.R

essgraph2amatR Documentation

Convert essential graph to adjacency matrix

Description

Extracts the adjacency matrix from an EssGraph-class object. This object is returned by score-based causal discovery algorithms in the pcalg package.

Usage

essgraph2amat(essgraph, p = length(essgraph$field(".nodes")))

Arguments

essgraph

An EssGraph object

p

The number of nodes in the graph

Value

An adjacency matrix (square matrix with 0/1 entries).


causalDisco documentation built on May 12, 2022, 9:05 a.m.