简体   繁体   English

eigen_centrality {igraph}崩溃R.

[英]eigen_centrality{igraph} crashes R

I am trying to use the eigen_centrality{igraph} to calculate the Eigenvector Centrality scores of the nodes in a network. 我试图使用eigen_centrality{igraph}来计算网络中节点的特征向量中心度分数。 Every time I run the command, though, Rstudio crashes. 但是,每次运行命令时, Rstudio崩溃。 I've also tried this in plain R but it crashes as well. 我也在普通的R试过这个,但它也崩溃了。

I am using Windows 10. I've already tried reinstalling the library without success. 我使用的是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)

It also crashes when I use the example provided in the library documentation 当我使用库文档中提供的示例时,它也会崩溃

# Generate some test data
  g <- make_ring(10, directed=FALSE)

# Compute eigenvector centrality scores
  eigen_centrality(g)

additional info: 附加信息:

I'm having the same problem on mac os and wanted to bump this question. 我在mac os上遇到同样的问题,想要提出这个问题。 I also removed and reinstalled igraph without luck. 我也删除并重新安装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> 

It works fine on my 4GB pc on window 8. Shows the following output eigen_centrality(g) 它在窗口8上的4GB pc上工作正常。显示以下输出eigen_centrality(g)

 $vector
     [1] 1 1 1 1 1 1 1 1 1 1

$value
[1] 2

$options
$options$bmat
[1] "I"

$options$n
[1] 10

$options$which
[1] "LA"

$options$nev
[1] 1

$options$tol
[1] 0

$options$ncv
[1] 0

$options$ldv
[1] 0

$options$ishift
[1] 1

$options$maxiter
[1] 1000

$options$nb
[1] 1

$options$mode
[1] 1

$options$start
[1] 1

$options$sigma
[1] 0

$options$sigmai
[1] 0

$options$info
[1] 0

$options$iter
[1] 5

$options$nconv
[1] 1

$options$numop
[1] 17

$options$numopb
[1] 0

$options$numreo
[1] 14

Check you memory size allocated to R by using this command memory.limit() 使用此命令memory.limit()检查分配给R的内存大小

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM