Learn R Programming

tnet (version 0.0.6)

clustering_w: Generalised clusering coefficient

Description

This programme provides the outcomes of the generalised clusering coefficient as proposed by Opsahl and Panzarasa: Clustering in weighted networks

Usage

clustering_w(edgelist, measure = "mi")

Arguments

edgelist
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")

Value

  • Returns the outcome of the equation presented in the paper for the method specific (measure)

References

Opsahl. T., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab