Learn R Programming

RCy3 (version 1.2.0)

setNodeLabelRule: setNodeLabelRule

Description

Specify the node attribute to be used as the label for each node. Non-character attributes are converted to strings before they are used as labels.

Usage

setNodeLabelRule(obj, node.attribute.name)

Arguments

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

Value

None.

Examples

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

  cw <- CytoscapeWindow ('setNodeLabelRule.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork (cw, 'force-directed')
  setNodeLabelRule (cw, 'label')
  setNodeLabelRule (cw, 'type')
  setNodeLabelRule (cw, 'lfc')
  setNodeLabelRule (cw, 'count')

Run the code above in your browser using DataLab