igraph

    0热度

    1回答

    我曾尝试使用pip install安装python-igraph但得到导入时的错误消息: :~$ pip install python-igraph Collecting python-igraph Installing collected packages: python-igraph Successfully installed python-igraph-0.7.1.post6 :~

    1热度

    1回答

    我试图使用igraph::topological.sort()获取图的拓扑排序并检查图是否有循环。该功能仅在图形包含循环时才会发出警告并返回部分结果,但在图形循环时必须停止处理,因此我在tryCatch()函数中调用igraph::topological.sort()。然后R口译员被核心倾倒。 最小代码重现: library(igraph) # This has a cycle adjace

    1热度

    1回答

    我有一个图使用下面的代码和中心度测量计算出来的图,我如何使用计算的中心度测量玩弄图。图像描述我图的外观,我想最大中心地位的节点应该在尺寸更大,而不是其他节点 r_stats_text_corpus <- Corpus(VectorSource(data1)) r_stats_text_corpus <- tm_map(r_stats_text_corpus, content_transforme

    0热度

    1回答

    我想使用类似以下,但这样多的示例数据进行网络更大 data <- structure(list(V1 = structure(c(1L, 1L, 1L, 1L, 5L, 5L, 6L, 2L, 4L, 4L, 3L, 7L), .Label = c("A", "AB", "AD", "AN", "B", "D", "GDH"), class = "factor"), V2 = structur

    0热度

    1回答

    我很好奇如何访问与边相关的图的其他属性。沿着这里遵循的是一个小例子: library("igraph") library("SocialMediaLab") myapikey ='' myapisecret ='' myaccesstoken = '' myaccesstokensecret = '' tweets <- Authenticate("twitter",

    1热度

    2回答

    如何访问igraph中图的top3连接组件的ID? c <- igraph::components(g, mode = 'weak') which(c$membership == which.max(c$csize)) 将给予最大的 和 which(c$membership == which.max(c$csize-1)) 相同的结果c$csize-1只会减去-1从所有价值。

    0热度

    1回答

    我很好奇如何计算每个节点的一些指标。 对于欺诈连接的用于 直接节点(定向) 直接节点从节点(定向)(无向) 友谊网络 的友谊的每个节点计算百分比网络从节点(无向) 总共和每个关系类型。 igraph入门我不确定如何前进到编写自己的图形处理函数(即不仅适用度,pagerank,...)。期待一些建议来解决这个任务,只需一遍遍图。 最少的样品是在这里 library(igraph) id = c("

    1热度

    2回答

    我有一个动物名称的数据帧: df <- data.frame( col1 = c("dog", "cat", "bird", "mammal", "avis", "canis", "feline"), col2 = c("canis", "feline", "avis", "animal", "animal", "mammal", "mammal")) library(igr

    2热度

    2回答

    我的代码 library(igraph) library(igraphdata) data("karate") g <- karate # for reproducibility set.seed(23548723) network_layout <- layout_with_fr(g) trimmed_network <- delete.edges(g, which(E(g

    0热度

    1回答

    以前从未使用R,这可能看起来相当愚蠢的问题。我将以下双向网络转换为单一模式并计算度数中心度量度。 library(igraph) el <- read.csv("foo.csv", header = T, sep = ",", stringsAsFactors = F) net <- graph.edgelist(as.matrix(el)) V(net)$type <- bipartite