triad_census | R Documentation |

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

triad_census(graph)

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

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:

- 003
A,B,C, the empty graph.

- 012
A->B, C, the graph with a single directed edge.

- 102
A<->B, C, the graph with a mutual connection between two vertices.

- 021D
A<-B->C, the out-star.

- 021U
A->B<-C, the in-star.

- 021C
A->B->C, directed line.

- 111D
A<->B<-C.

- 111U
A<->B->C.

- 030T
A->B<-C, A->C.

- 030C
A<-B<-C, A->C.

- 201
A<->B<->C.

- 120D
A<-B->C, A<->C.

- 120U
A->B<-C, A<->C.

- 120C
A->B->C, A<->C.

- 210
A->B<->C, A<->C.

- 300
A<->B<->C, A<->C, the complete graph.

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

.

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

Gabor Csardi csardi.gabor@gmail.com

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.

`dyad_census`

for classifying binary relationships,
`motifs`

for the underlying implementation.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.