Length of a caugi_graph
length.RdReturns the number of nodes in the graph.
See also
Other caugi_graph methods:
print()
Examples
cg <- caugi_graph(
A %-->% B,
class = "DAG"
)
length(cg) # 2
#> [1] 2
cg2 <- caugi_graph(
A %-->% B + C,
nodes = LETTERS[1:5],
class = "DAG"
)
length(cg2) # 5
#> [1] 5