# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('saveNetwork.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
redraw (cw)
filename <- paste (getwd (), 'saveNetworkTest', sep='/')
saveNetwork (cw, filename) # overwrites files with the same name
# check if the file exists
file.exists (paste0(filename, '.cys'))
Run the code above in your browser using DataLab