我想从页面http://www.babelgraph.org/wp/?p=1运行示例脚本, 但没有 community.to.membership 功能。我尝试过 cutat 功能,但我有错误。代码如下:
library(igraph)
ga.data <- read.csv('ga_edgelist.csv', header=TRUE)
g <- graph.data.frame(ga.data, directed=FALSE)
gnc <- edge.betweenness.community(g, directed=FALSE)
gn.groups <- cutat(g, steps=25) #**Error: Not a community structure**
modularity(g, gn.groups)
V(g)$color <- gn.groups
V(g)$size <- degree(g) * 2 # multiply by 2 for scale
plot(g)
有人可以帮我解决这个错误吗?