Skip to contents

The skeleton of a graph is obtained by replacing all directed edges with undirected edges.

Usage

skeleton(cg)

Arguments

cg

A caugi object. Either a DAG or PDAG.

Value

A caugi object representing the skeleton of the graph (UG).

Details

This changes the graph from any class to an Undirected Graph (UG), also known as a Markov Graph.

See also

Other operations: moralize(), mutate_caugi()

Examples

cg <- caugi(A %-->% B, class = "DAG")
skeleton(cg) # A --- B
#> <caugi object; 2 nodes, 1 edges; simple: TRUE; built: TRUE; ptr=0x5559e5e537b0>
#>   graph_class: UG
#>   nodes: A, B
#>   edges: A---B