Description Usage Arguments Author(s) Examples
Description: The function node2edgeAttr assigns edge attributes to a network object based on the node attribute specified in the argument.
1 | node2edgeAttr(net.object, vertex.attribute)
|
net.object |
The network object. Accepts both igraph and network objects |
net.samples |
Node or vertex.attribute to be used to create the edge attribute. |
directed |
Defaults to FALSE. Indicates whether the network is directed or not. If undirected the function aggregates edges nodeA->nodeB and nodeB->nodeA as the same . |
Marco T. Bastos
1 2 3 4 | # Not run:
net.object <- barabasi.game(50)
V(net.object)$color <- ifelse(V(net.object)
E(net.object)$color <- node2edgeAttr(net.object, vertex.attribute = "color") # create edge attribute based on node attribute
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.