Learn R Programming

RCy3 (version 1.2.0)

getFirstNeighbors: getFirstNeighbors

Description

Returns a non-redundant ('uniquified') list of all of the first neighbors of the supplied list of nodes.

Usage

getFirstNeighbors(obj, node.names, as.nested.list = FALSE)

Arguments

obj
a CytoscapeWindowClass object.
as.nested.list
a Boolean object of if a nested list or a concatenated list should be returned
node.names
a String list object.

Value

A list of node names.

See Also

selectNodes selectFirstNeighborsOfSelectedNodes

Examples

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

  cw <- CytoscapeWindow ('getFirstNeighbors.test', graph=makeSimpleGraph())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw, 'grid')
  print (getFirstNeighbors (cw, 'A'))
  selectNodes (cw, getFirstNeighbors (cw, 'A'))  # note that A is not selected

Run the code above in your browser using DataLab