Edges: Edges

EdgesR Documentation

Edges

Description

This function creates edges between nodes in networks.

Usage

createEdges(id = NULL, source, target, interaction = NULL)

Arguments

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"

Details

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.

Value

EdgesAspect object

See Also

updateEdges for adding a EdgesAspect object to an EdgesAspect or RCX object

Examples

## 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))

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.