clustering_w {tnet} | R Documentation |
This function calculates the generalised clusering coefficient as proposed by Opsahl, T., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks 31 (2), 155-163, doi: 10.1016/j.socnet.2009.02.002
clustering_w(net, measure = "mi")
net |
A weighted edgelist |
measure |
The measure-switch control the method used to calculate the value of the triplets. am implies the arithmetic mean method gm implies the geometric mean method mi implies the minimum method ma implies the maximum method This can be c("am", "gm", "mi", "ma") to calculate all. |
Returns the outcome of the equation presented in the paper for the method specific (measure)
version 1.0.0
Tore Opsahl; http://toreopsahl.com
Opsahl, T., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks 31 (2), 155-163, doi: 10.1016/j.socnet.2009.02.002
http://toreopsahl.com/2009/04/03/article-clustering-in-weighted-networks/
## Generate a random graph #density: 300/(100*99)=0.03030303; #this should be average from random samples rg <- rg_w(nodes=100,arcs=300,max.weight=10) ## Run clustering function clustering_w(rg)