This function calculates Barrat et al. (2004) generalised local clusering coefficient. For a detailed description and alternative ways of defining triplet values, see this blog post.
Example
# Load tnet library(tnet)
# Generate a random graph rg <- rg_w(nodes=100,arcs=300,max.weight=10,directed=FALSE)