Skip to content
Prev 518 / 21312 Next

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

Hi,
 best to send these to the Bioconductor list,
  thanks
   Robert
Korbinian Strimmer wrote:

            
### begin code ###

 library(graph) # load version 1.10.0

 # construct a small graph with a single edge and weight 0.2
 V <- LETTERS[1:4]
 gR <- new("graphNEL", nodes=V)
 gX <- addEdge("A", "C", gR, 0.2)  # weight = 0.2

 # now we check the edge weight...

 # first possibility: ok
 edgeData(gX)                      # weight = 0.2

 # second possibility: not ok
 eWV(gX, edgeMatrix(gX), useNNames = TRUE)  # BUG: weight = 1

 # third possibility: not ok
 pathWeights(gX, c("A", "C"))               # BUG: weight = 1

 ### end code ###