Learn R Programming

RCytoscape (version 1.22.0)

saveNetwork: saveNetwork

Description

Write a network of the specified type to the specified file, at the specified scaling factor. Note: the file is written to the file system of the computer upon which Cytoscape is running, not R -- in those cases where they are different.

Usage

saveNetwork(obj, file.name, format='gml')

Arguments

obj
a CytoscapeWindowClass object.
file.name
a char object.
format
a char object. 'gml' is the only type currently supported

Value

None.

See Also

saveImage

Examples

Run this code
  cw <- new.CytoscapeWindow ('saveNetwork.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'jgraph-spring')
  redraw (cw)

  #filename <- sprintf ('%s/%s', tempdir (), 'saveNetworkTest.gml')
  #not sure if this will work at bioc   
  #saveNetwork (cw, filename)
  #print (sprintf ('gml file exists? %s', file.exists (filename)))

Run the code above in your browser using DataLab