在add.edges()期间分配一个属性,比如width:
g <- add.edges(g,c(from,to), attr= width <- 1 )
Error message:
please supply names for attributes发布于 2012-07-20 19:14:20
您需要为其分配一个命名列表:
g <- graph.adjacency(matrix(0,2,2))
g <- add.edges(g,c(1,2),attr=list(width=10))使用您使用的代码,您将1赋给了一个变量width,然后将width的值(即1 )赋给了参数attr。
https://stackoverflow.com/questions/11577830
复制相似问题