Edges | R Documentation |
This function creates edges between nodes in networks.
createEdges(id = NULL, source, target, interaction = NULL)
id |
integer (optional); edge IDs |
source |
integer; reference to node id |
target |
integer; reference to node id |
interaction |
character (optional); type of interaction, eg. "binds" or "activates" |
Edges are represented by EdgesAspect objects.
Edges connect two nodes, which means that source and target must reference the IDs of nodes in a Nodes
object.
On creation, the IDs don't matter yet, but at least while adding the EdgesAspect object to an RCX-object
,
the IDs must be present in the nodes aspect of the RCX-object
.
Similar to nodes, an edge also has a unique id, which must be an (positive) integer, which serves as reference to other aspects. If no IDs are provided, those are assigned automatically. Optionally, edges can have an interaction attribute to define the type of interaction between the nodes.
EdgesAspect object
updateEdges
for adding a EdgesAspect object to an EdgesAspect or RCX object
## create some simple edges edges1 = createEdges(source=1, target=2) ## create edges with more information edges2 = createEdges(id=c(3,2,4), source=c(0,0,1), target=c(1,2,2), interaction=c("activates","inhibits", NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.