Learn R Programming

RCy3 (version 1.2.0)

setEdgeLabelRule: setEdgeLabelRule

Description

Specify the edge attribute to be used as the label displayed on each edge. Non-character attributes are converted to strings before they are used.

Usage

setEdgeLabelRule(obj, edge.attribute.name)

Arguments

obj
a CytoscapeWindowClass object.
edge.attribute.name
the edge attribute whose values will determine the edge label on each edge, when this rule is applied.

Value

None.

See Also

setNodeBorderColorRule (detailed example) setEdgeColorRule

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('setEdgeLabelRule.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork (cw, 'force-directed')
  setEdgeLabelRule (cw, 'edgeType')

Run the code above in your browser using DataLab