Calculates Equivalence Classes
an atomic vector
an atomic vector of the same mode and length as
an atomic vector of the same mode as
controls the type of result; see Values below.
(from[i], to[i]) can be though of either as elements of
a symmetric relation on a set or as edges in an undirected graph.
This function calculates the equivalence classes of the transitive
closure of the relation or the components of the graph. If the edges
are thought of as directed, then we calculate the weak components,
meaning the components of the associated undirected graph, rather than
the so-called strong components of the directed graph.
markers = FALSE,
a list, elements of which are the components (equivalence classes).
markers = TRUE, an integer vector of the same length as
domain or as
union(from, to) if
domain is missing,
elements of which are the same if and only if the corresponding elements
of the domain (nodes of the graph) are in the same connected component
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.