[Bioc-devel] bug in graph package version 1.10.0 (fwd)

Korbinian Strimmer korbinian.strimmer at lmu.de
Tue May 9 11:54:33 CEST 2006

Li.Long at isb-sib.ch schrieb:
> Hi,
> With the recent work on "graph", if you don't define an attribute "weight"
> for an edge/a node, the default edge weight will be 1.
> I suspect the codes didn't create attribute "weight" for the edge when
> adding the edge with weight, so "pathWeights()" uses default 1 for weights
> for all edges.  (I'm not familiar with eWV/pathWeights, but it sounds very
> similar to what I experienced with edgeWeight)

The problem is that that the weight *is* defined,
because addEdge() implicitly creates it.
If you run the example script you see that

  edgeData(gX)                      # weight = 0.2


[1] 0.2

[1] 0.2

In all previous versions of graph the command

  eWV(gX, edgeMatrix(gX), useNNames = TRUE)

would give the edge weight as "0.2", but not so in version
1.10.0 Note that the above command appears in the examples
on the help page of edgeMatrix():


Thanks, Korbinian

Korbinian Strimmer              http://www.statistik.lmu.de/~strimmer/
Dept. of Statistics, University of Munich, Ludwigstr. 33, 80539 Munich
+49 89 2180-3225 (phone), -5041 (fax), korbinian.strimmer at lmu.de

More information about the Bioc-devel mailing list