Skip to main content

Drop edge marks to an undirected graph

Source: R/transform.R, R/jlbind-wrappers.R

Description

Returns the skeleton of cg, the undirected graph obtained by replacing every edge, of any type, with an undirected edge. Parallel edges between two nodes become one edge, and self-loops are dropped.

Usage

Arguments

cg A graph created with cgraph(), of any class.

Value

A cgraph of class UG.

Examples

dag <- cgraph(A %-->% B, B %-->% C)
skeleton(dag)
#> UG with 3 nodes and 2 edges:
#>   nodes: A, B, C
#>   edges:
#>     A --- B, B --- C