2014-07-06 184 views

回答

5

嘗試在呼叫使用sparse=FALSEget.adjacency(...)

g <- graph.full(5) 
test <- get.adjacency(g) 
class(test) 
# [1] "dgCMatrix" 
# attr(,"package") 
# [1] "Matrix" 

test <- get.adjacency(g,sparse=FALSE) 
class(test) 
# [1] "matrix" 
+0

謝謝,這工作正常! –