是否可以将一组图(来自igraph
)存储在向量或其他数据结构中?
我尝试通过以下方式实现:
require('igraph')
g1 <- make_tree(10,3)
g2 <- make_tree(30,3)
gs <- c(g1,g2)
as.igraph(gs[1])
但是它无法正常工作。我收到了错误信息:
Error in UseMethod("as.igraph") :
no applicable method for 'as.igraph' applied to an object of class "list"