Perform a trad census

count_triads(x, echo = TRUE)

Arguments

x

graph data

echo

logical, should the result be printed in the console? Default is TRUE.

Value

a data.frame

Details

Perform a trad census on the network data. As input, x can be any of igraph, network, or matrix.

The output is a data.frame that countains the counts for each of the 16 triad types.

The output is invisibly returned and (if echo is TRUE) also printed in the console.

Examples

data(judge_net, package = "snafun")
count_triads(judge_net)
#>   003 012  102 021D 021U 021C 111D 111U 030T 030C 201 120D 120U 120C 210 300
#>  6703   0 2880    0    0    0    0    0    0    0 199    0    0    0   0  98