essgraph2amat: 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")))Value
An adjacency matrix (square matrix with 0/1 entries).
Arguments
- essgraph
An EssGraph object
- p
The number of nodes in the graph