admin 发表于 2014-12-1 09:08:42

【igraph包】R中画网络图

install.packages("igraph")
require(igraph)
d = data.frame(p1   = c('a', 'b', 'c'),
               p2   = c('b', 'c', 'a'),
               weight = c(1, 2, 4))
g = graph.data.frame(d, directed = FALSE)
plot(g, edge.width = E(g)$weight)


页: [1]
查看完整版本: 【igraph包】R中画网络图