[Bioc-devel] efficient use of edgeData (graph)

Paul Shannon pshannon at systemsbiology.org
Wed Nov 10 16:01:58 CET 2010

In the RCytoscape package I have a convenience function which returns the values of a specified edge attribute, for all edges in the graph.  It is ponderously slow on a graph of 9000 edges.

I define it this way:

function (graph, edge.attribute.name) {
  unlist (sapply (names (edgeData (graph)), function (n) edgeData (graph)[[n]][[edge.attribute.name]]))

Can anyone suggest ways to speed this up?   I fear I am missing something obvious.


 - Paul

More information about the Bioc-devel mailing list