verify_dag: Verify a Directed Acyclic Graph

Description Usage Arguments Value Examples

View source: R/verify_dag.R

Description

Verifies whether a given connection matrix is a Directed Acyclic Graph. verify_dag wraps check_dag for a recursive Depth First Search for acyclicity.

Usage

1

Arguments

DAG

A lower triangular matrix where the non zero elements what connections exist. The rows indicate the node where the edge is going to, and the columns indicates the node where the edge is coming from.

Value

A list of lists of errors and warnings respectively that indicate what conditions of the DAG requirements are not met.

Examples

1
verify_dag(t(matrix(c(0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0),nrow=4, ncol=4)))

GeertPostma/pathmodelr documentation built on Oct. 5, 2021, 4:17 p.m.