Learn R Programming

ggm (version 0.5)

conComp: Connectivity components

Description

Finds the connectivity components of a graph.

Usage

conComp(gmat)

Arguments

gmat
a square Boolean matrix with dimnames, the edge matrix of a DAG or a UG.

Value

  • an integer vector representing a partition of the set of nodes.

References

Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.

See Also

UG, anGraph

Examples

Run this code
## three connected components
conComp(UG(~a*c+c*d+e+g*o*u))
## a connected graph
conComp(UG(~ a*b+b*c+c*d+d*a))

Run the code above in your browser using DataLab