Learn R Programming

stagedtrees (version 2.1.0)

ceg2adjmat: Ceg to adjmat of graph

Description

Obtain the adjacency matrix corresponding to a CEG.

Usage

ceg2adjmat(x)

Arguments

x

an object of class ceg.

Value

the adj matrix

Details

This utility function can be used to prepare the adjacency matrix to plot the CEG using a graph package (e.g. igraph).

Examples

Run this code
# NOT RUN {
model <- stages_fbhc(full(PhDArticles))
model.ceg <- ceg(model)
ceg2adjmat(model.ceg)
# }

Run the code above in your browser using DataLab