Learn R Programming

RCy3 (version 1.2.0)

invertNodeSelection: invertNodeSelection

Description

Invert the node selection, i.e. select all nodes that were not selected and deselect all nodes that were selected.

Usage

invertNodeSelection(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

None.

See Also

clearSelection invertEdgeSelection

Examples

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

  cw <- CytoscapeWindow ('invertNodeSelection demo', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork (cw, 'force-directed')
  invertNodeSelection (cw)
     # all nodes should be selected, since none were before
  invertNodeSelection (cw)
     # no node should be selected, since all were before
  selectNodes (cw, 'A')
  invertNodeSelection (cw)
    # only B and C should be selected

Run the code above in your browser using DataLab