Learn R Programming

RCy3 (version 1.2.0)

getSelectedNodeCount: getSelectedNodeCount

Description

Returns the number of node currently selected.

Usage

getSelectedNodeCount(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

An integer.

Examples

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

  cw <- CytoscapeWindow ('getSelectedNodeCount.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'force-directed')
  redraw (cw)
    # in Cytoscape, interactively select two nodes, or call selectNodes
  selectNodes (cw, c ('A','B'))
  getSelectedNodeCount (cw)
  # [1] 2

Run the code above in your browser using DataLab