Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 add.edges() 期间分配一个属性,例如宽度:
g <- add.edges(g,c(from,to), attr= width <- 1 ) Error message: please supply names for attributes
您需要为其分配一个命名列表:
g <- graph.adjacency(matrix(0,2,2)) g <- add.edges(g,c(1,2),attr=list(width=10))
使用您使用的代码,您分配1给一个变量width,然后将 的值width,即1,分配给参数attr。
1
width
attr