【发布时间】:2018-07-28 22:43:39
【问题描述】:
我想计算一个图的平均聚类系数(来自igraph 包)。但是,我不确定我应该遵循哪种方法。
library(igraph)
graph <- erdos.renyi.game(10000, 10000, type = "gnm")
# Global clustering coefficient
transitivity(graph)
# Average clustering coefficient
transitivity(graph, type = "average")
# The same as above
mean(transitivity(graph, type = "local"), na.rm = TRUE)
我将不胜感激。
【问题讨论】:
标签: r igraph social-networking