length.caugi: Length of a 'caugi'

View source: R/methods.R

length.caugiR Documentation

Length of a caugi

Description

Returns the number of nodes in the graph.

Usage

## S3 method for class 'caugi'
length(x)

Arguments

x

A caugi object.

Value

An integer representing the number of nodes.

See Also

Other caugi methods: caugi-equality, print.caugi()

Examples

cg <- caugi(
  A %-->% B,
  class = "DAG"
)
length(cg) # 2

cg2 <- caugi(
  A %-->% B + C,
  nodes = LETTERS[1:5],
  class = "DAG"
)
length(cg2) # 5


caugi documentation built on Oct. 28, 2026, 1:07 a.m.