对图形对象的快速贪婪

时间:2018-09-10 18:35:28

标签: r igraph

因此,我已通过以下操作读取了csv文件中的网络数据,并将其转换为图形对象

g = read.csv"somefile.csv", header = FALSE)
G = graph.data.frame(g,directed=FALSE)
fc = cluster_fast_greedy(G)

Error in cluster_fast_greedy(G) : 
At fast_community.c:639 : fast-greedy community finding works only on graphs 
without multiple edges, Invalid value

非常有趣的是,我尝试直接加载graphml版本,并且可以正确运行fast greedy函数。

我的问题是,如果我仅限于csv文件,如何在其上运行fast_greedy函数?

1 个答案:

答案 0 :(得分:3)

如错误消息所述,

  

快速贪婪社区发现仅适用于没有多个边的图

但是您可以使用 Auth0 .authentication() .login( usernameOrEmail: "me@mycompany.com", password: "password", realm: "MY-CONNECTION", audience: "https://myapp.auth0.com/userinfo", scope: "openid") .start { result in switch result { case .success(let credentials): print("Obtained credentials: \(credentials)") case .failure(let error): print("Failed with \(error)") } } 函数删除多个边缘。 这是一个例子。首先,我创建一个具有多个边的图- simplify失败。但是经过简化,它可以工作。

fastgreedy.community