【发布时间】:2017-05-20 11:41:02
【问题描述】:
我正在尝试使用eigen_centrality{igraph} 来计算网络中节点的特征向量中心性分数。但是,每次我运行命令时,Rstudio 都会崩溃。我也用普通的R 试过这个,但它也崩溃了。
我使用的是 Windows 10。我已经尝试重新安装库但没有成功。
library(igraph)
# sample graph
g <- sample_gnp(10, 2/10); E(g)$weight <- runif(ecount(g))
# get eigen centrality
eigen <- eigen_centrality(g, directed = T, weights = E(g)$weight, scale = T)
当我使用库文档中提供的示例时,它也会崩溃
# Generate some test data
g <- make_ring(10, directed=FALSE)
# Compute eigenvector centrality scores
eigen_centrality(g)
附加信息:
我在 mac os 上遇到了同样的问题,想提出这个问题。我还删除并重新安装了igraph,但运气不佳。
$ R
R> library(igraph)
R> #Generate some test data
R> g <- make_ring(10, directed=FALSE)
R> #Compute eigenvector centrality scores
R> eigen_centrality(g)
Fortran runtime error: Insufficient number of elements in TARRAY.
$
$ echo $?
2
$
$ R
R> library(igraph)
R> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS High Sierra 10.13.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] igraph_1.2.2
loaded via a namespace (and not attached):
[1] compiler_3.4.2 magrittr_1.5 pkgconfig_2.0.2
R> R.version
_
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 4.2
year 2017
month 09
day 28
svn rev 73368
language R
version.string R version 3.4.2 (2017-09-28)
nickname Short Summer
R>
【问题讨论】:
-
我今天再次使用了该代码(20200315),它工作正常。似乎
igraph的一些更新已经解决了这个问题,所以我要结束这个问题了