Learn R Programming

RCy3 (version 1.2.0)

addCyNode: addCyNode

Description

Given a CytoscapeWindow containing a (possibly empty) graph, this method adds a node. Node attributes are added separately, via successive calls to sendNodeAttributesDirect. The new node must be unique -- not already a member of the graph as known to Cytoscape.

Usage

addCyNode(obj, nodeName)

Arguments

obj
a CytoscapeWindowClass object.
nodeName
a character string object.

Value

See Also

sendNodeAttributesDirect addCyEdge

Examples

Run this code
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())
  window.name <- 'demo addCyNode'
  cw <- CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  layoutNetwork (cw)
  addCyNode (cw, 'A NEW NODE')
  layoutNetwork (cw)
  # redraw (cw) --> function no longer required

Run the code above in your browser using DataLab