Learn R Programming

stagedtrees (version 2.2.1)

ceg2adjmat: Ceg to adjmat of graph

Description

Obtain the adjacency matrix corresponding to a CEG.

Usage

ceg2adjmat(x)

Value

the adj matrix

Arguments

x

an object of class ceg.

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
model <- stages_fbhc(full(PhDArticles))
model.ceg <- ceg(model)
ceg2adjmat(model.ceg)

Run the code above in your browser using DataLab