| is_acyclic | R Documentation |
caugi acyclic?Checks if the given caugi graph is acyclic.
is_acyclic(cg, force_check = FALSE)
cg |
A |
force_check |
Logical; if |
Logically, it should not be possible to have a graph class of "DAG", "PDAG", "MPDAG", or "CPDAG" that has cycles, but in case the user modified the graph after creation in some unforeseen way that could have introduced cycles, this function allows to force a check of acyclicity, if needed.
A logical value indicating whether the graph is acyclic.
Other queries:
ancestors(),
anteriors(),
children(),
components(),
descendants(),
districts(),
edge_types(),
edges(),
exogenous(),
is_admg(),
is_ag(),
is_caugi(),
is_cpdag(),
is_dag(),
is_empty_caugi(),
is_mag(),
is_mpdag(),
is_pdag(),
is_simple(),
is_ug(),
m_separated(),
markov_blanket(),
neighbors(),
nodes(),
parents(),
posteriors(),
same_nodes(),
spouses(),
subgraph(),
topological_sort()
cg_acyclic <- caugi(
A %-->% B,
B %-->% C,
class = "DAG"
)
is_acyclic(cg_acyclic) # TRUE
cg_cyclic <- caugi(
A %-->% B,
B %-->% C,
C %-->% A,
class = "UNKNOWN"
)
is_acyclic(cg_cyclic) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.