Test for Cycles
Returns TRUE
if the given graph does not contain a directed cycle.
isAcyclic(x)
x |
the input graph, of any graph type. |
This function will only consider simple directed edges in the given graph.
g1 <- dagitty("dag{X -> Y -> Z}") stopifnot( isTRUE(isAcyclic( g1 )) ) g2 <- dagitty("dag{X -> Y -> Z -> X}") stopifnot( isTRUE(!isAcyclic( g2 )) ) g3 <- dagitty("mag{X -- Y -- Z -- X}") stopifnot( isTRUE(isAcyclic( g3 )) )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.