Learn R Programming

RCy3 (version 1.2.0)

setNodeAttributes: setNodeAttributes

Description

Transfer the named node attribute from the R graph (found in obj@graph) to Cytoscape. This method is typically called by displayGraph, which will suffice for most users' needs. It transfers the specified node attributes, for all nodes, from the cw@graph slot to Cytoscape.

Usage

setNodeAttributes(obj, attribute.name)

Arguments

obj
a CytoscapeWindowClass object.
attribute.name
a string one of the attributes defined on the nodes.

Value

None.

See Also

setNodeAttributesDirect setEdgeAttributes setEdgeAttributesDirect sendEdges sendNodes displayGraph

Examples

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

  cw <- CytoscapeWindow ('setNodeAttributes.test', graph=makeSimpleGraph())
  attribute.names <- noa.names (cw@graph)
  sendNodes (cw)
  for (attribute.name in attribute.names){
    setNodeAttributes (cw, attribute.name)
  }

Run the code above in your browser using DataLab