Learn R Programming

RCytoscape (version 1.22.0)

deleteNodeAttribute: deleteNodeAttribute

Description

Node and node attributes are usually added to a Cytoscape network by defining them on the graph used to construct a CytoscapeWindow. Once Cytoscape has been passed an attribute, however, it persists until you exit the application or delete it -- using the Cytoscape graphical user interface, or by calling this method.

Usage

deleteNodeAttribute(obj, attribute.name)

Arguments

obj
a CytoscapeConnectionClass object or CytoscapeWindow object.
attribute.name
a character string, the name of the attribute you wish to delete.

Value

nothing

See Also

getNodeAttributeNames addNodeAttribute

Examples

Run this code

  window.name = 'demo.deleteNodeAttribute'
  cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ())
  displayGraph (cw)
  redraw (cw)
  layoutNetwork(cw)

  print (paste ("before: ", getNodeAttributeNames (cw)))
  deleteNodeAttribute (cw, 'count')
  print (paste ("after: ", getNodeAttributeNames (cw)))

Run the code above in your browser using DataLab