Learn R Programming

RCytoscape (version 1.22.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)

Arguments

obj
a CytoscapeWindowClass object.
node.names
a String list object.

Value

A list of node names.

See Also

selectNodes selectFirstNeighborsOfSelectedNodes

Examples

Run this code
  cw <- new.CytoscapeWindow ('getFirstNeighbors.test', graph=makeSimpleGraph())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw, 'jgraph-spring')
  print (getFirstNeighbors (cw, 'A'))
  selectNodes (cw, getFirstNeighbors (cw, 'A'))  # note that A is not selected

Run the code above in your browser using DataLab