
Calculate the local clustering coefficient
Source:R/localClusteringCoefficient.R
localClusteringCoefficient.Rd
Calculate the local clustering coefficient for each node in an adjacency matrix. The clustering coefficient is defined as the proportion of existing connections from the total possible (Watts and Strogatz, 1998).
References
D.J. Watts and S.H. Strogatz. (1998) Collective dynamics of 'small-world' networks. Nature. 393(6684). 440-442.
Examples
localClusteringCoefficient(network_gen(50,.33)$network)
#> [1] 0.05000000 0.33333333 0.00000000 0.04444444 NaN 0.50000000
#> [7] 0.50000000 0.50000000 0.33333333 0.16666667 0.00000000 0.05000000
#> [13] 0.00000000 0.00000000 NaN 0.50000000 -0.50000000 0.00000000
#> [19] 0.00000000 -0.50000000 NaN 0.00000000 NaN 0.00000000
#> [25] 0.03333333 0.00000000 0.16666667 0.07142857 0.50000000 0.50000000
#> [31] 0.50000000 0.00000000 NaN NaN 0.16666667 0.03333333
#> [37] 0.50000000 0.00000000 0.16666667 NaN 0.16666667 0.16666667
#> [43] NaN NaN 0.50000000 0.00000000 -0.50000000 NaN
#> [49] 0.10000000 0.00000000