igraph (version 1.0.0)

triad_census: Triad census, subgraphs with three vertices

Description

This function counts the different subgraphs of three vertices in a graph.

Usage

triad_census(graph)

Arguments

graph
The input graph, it should be directed. An undirected graph results a warning, and undefined results.

Value

  • A numeric vector, the subgraph counts, in the order given in the above description.

Details

Triad census was defined by David and Leinhardt (see References below). Every triple of vertices (A, B, C) are classified into the 16 possible states: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

This functions uses the RANDESU motif finder algorithm to find and count the subgraphs, see motifs.

References

See also Davis, J.A. and Leinhardt, S. (1972). The Structure of Positive Interpersonal Relations in Small Groups. In J. Berger (Ed.), Sociological Theories in Progress, Volume 2, 218-251. Boston: Houghton Mifflin.

See Also

dyad_census for classifying binary relationships, motifs for the underlying implementation.

Examples

Run this code
g <- sample_gnm(15, 45, directed = TRUE)
triad_census(g)

Run the code above in your browser using DataCamp Workspace