我试图使用 eigen_centrality{igraph}
来计算网络中节点的特征向量中心性(Eigenvector Centrality)得分。但是每次运行该命令时,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>
igraph
的某个更新已经修复了问题,因此我将关闭此问题。 - rafa.pereira