dag <- cgraph(A %-->% B, class = "PDAG")
is_dag(dag) # TRUE, even though assigned PDAG
#> [1] TRUE
is_ug(dag)
#> [1] FALSE
is_acyclic(dag)
#> [1] TRUE

Graph class predicates
Source: R/queries.R, R/jlbind-wrappers.R
Description
Test which class a graph belongs to, or its structural properties. The class predicates are is_dag(), is_pdag(), is_cpdag(), is_mpdag(), is_ug(), is_admg(), is_ag(), is_mag() and is_pag(); the structural ones are is_simple() and is_acyclic().
Usage
Arguments
cg
|
A graph created with cgraph(), of any class.
|
Details
These test the actual edge structure of cg, independent of the class it has.
Value
A logical scalar.