Skip to contents

Get nodes or edges of a caugi_graph

Usage

nodes(cg)

vertices(cg)

V(cg)

Arguments

cg

A caugi_graph object.

Value

A tibble with a name column.

Examples

cg <- caugi_graph(
  A %-->% B,
  B %-->% C,
  D,
  class = "DAG"
)
nodes(cg) # returns the tibble with nodes A, B, C, D
#> # A tibble: 4 × 1
#>   name 
#>   <chr>
#> 1 A    
#> 2 B    
#> 3 C    
#> 4 D