Learn R Programming

RCy3 (version 1.2.0)

setGraph: setGraph

Description

Assigns the supplied graph object to the appropriate slot in the specified CytoscapeWindow object.

Usage

setGraph(obj, graph)

Arguments

obj
a CytoscapeWindowClass object.
graph
a graph object.

Value

The modified CytoscapeWindow object.

Examples

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

  cw <- CytoscapeWindow ('setGraph.test')  # an empty graph is created by default
  graph <- makeSimpleGraph ()
  setGraph (cw, graph)
  displayGraph (cw)
  layoutNetwork (cw, 'force-directed')
  print (length (nodes (getGraph (cw))))

Run the code above in your browser using DataLab