Frage

Assign during add.edges() an attribute, like width:

g <- add.edges(g,c(from,to), attr= width <- 1 ) 

Error message:
please supply names for attributes
War es hilfreich?

Lösung

You need to assign it a named list:

g <- graph.adjacency(matrix(0,2,2))
g <- add.edges(g,c(1,2),attr=list(width=10))

With the code you used you assign 1 to a variable width and then assign the value of width, i.e. 1, to the argument attr.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top