Learn R Programming

caugi (version 1.0.0)

length: Length of a caugi

Description

Returns the number of nodes in the graph.

Value

An integer representing the number of nodes.

Arguments

x

A caugi object.

See Also

Other caugi methods: print()

Examples

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

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

Run the code above in your browser using DataLab