Skip to contents

Checks if the given object is a caugi_graph. Mostly used internally to validate inputs.

Usage

is_caugi(x, throw_error = FALSE)

Arguments

x

An object to check.

throw_error

Logical; if TRUE, throws an error if x is not a caugi_graph.

Value

A logical value indicating whether the object is a caugi_graph.

Examples

cg <- caugi_graph(
  A %-->% B,
  class = "DAG"
)

is_caugi(cg) # TRUE
#> [1] TRUE