# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('getEdgeCount.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork(cw, 'force-directed')
redraw (cw)
getEdgeCount (cw)
# [1] 3
Run the code above in your browser using DataLab