This measure is sometimes called clustering coefficient.
Arguments
- A
A matrix
- method
Whether to calculate the
weakcensus
,global
transitivity ratio, themean
transitivity or thelocal
transitivity.- select
Whether to consider
all
,in
orout
ties for the local transitivity.
References
Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.
Examples
A <- matrix(c(
0, 1, 0, 1, 0,
1, 0, 1, 1, 0,
0, 1, 0, 0, 0,
1, 1, 0, 0, 1,
0, 0, 0, 1, 0
), byrow = TRUE, ncol = 5)
rownames(A) <- letters[1:ncol(A)]
colnames(A) <- rownames(A)
trans_coef(A, method = "local")
#> $a
#> [1] 1
#>
#> $b
#> [1] 0.3333333
#>
#> $c
#> [1] NaN
#>
#> $d
#> [1] 0.3333333
#>
#> $e
#> [1] NaN
#>