Learn R Programming

RCy3 (version 1.2.0)

deleteSelectedNodes: deleteSelectedNodes

Description

This function deletes all the selected nodes in Cytoscape. Edges originating or terminating in these nodes will also be deleted. The nodes and edges will still exist in the corresponding R graph until you explicitly delete them there as well.

Usage

deleteSelectedNodes(obj)

Arguments

obj
a CytoscapeWindowClass object.

Value

None.

See Also

selectNodes deleteSelectedEdges

Examples

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

  cw <- CytoscapeWindow ('deleteSelectedNodes.test', graph=makeSimpleGraph())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw, 'force-directed') 
  print (nodes (cw@graph))
    # [1] "A" "B" "C"
  selectNodes (cw, "B")
  deleteSelectedNodes (cw)

Run the code above in your browser using DataLab