Problems with combineNodes in graph
1
0
Entering edit mode
@michael-hahsler-3375
Last seen 9.6 years ago
Hi, I encountered the following problem with the package graph. Maybe someone can tell me what I'm doing wrong. > library("graph") > > sessionInfo() R version 2.8.1 (2008-12-22) i486-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US .UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_N AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTI FICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] graph_1.20.0 loaded via a namespace (and not attached): [1] cluster_1.11.12 tools_2.8.1 > > g <- new("graphNEL", nodes = as.character(1:10), edgemode="directed") > g <- addEdge("1", "10", g, 1) > combineNodes(as.character(1:5), g, "1") Error in graph:::.normalizeEdges(from, to) : 'from' must be length 1 or 1 for this call. > > combineNodes(c("1","2"), g, "X") Error in graph:::.normalizeEdges(from, to) : 'from' must be length 1 or 1 for this call. Thanks, Michael -- Michael Hahsler email: michael at hahsler.net web: http://michael.hahsler.net
graph graph • 649 views
ADD COMMENT
0
Entering edit mode
Florian Hahne ▴ 540
@florian-hahne-2471
Last seen 9.6 years ago
Hi Michael, this was a bug in the graph package which should now be fixed in the latest devel version (1.21.5) I also fixed the bug in edgeWeights which will now correctly return an empty list for all nodes in index instead of a list for all nodes of the whole graph, in the boundary case of a graph without any edges. Thanks for pointing this out, Florian Michael Hahsler wrote: > Hi, > > I encountered the following problem with the package graph. Maybe > someone can tell me what I'm doing wrong. > > > > library("graph") > > > > sessionInfo() > R version 2.8.1 (2008-12-22) > i486-pc-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_ US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC _NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDEN TIFICATION=C > > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] graph_1.20.0 > > loaded via a namespace (and not attached): > [1] cluster_1.11.12 tools_2.8.1 > > > > g <- new("graphNEL", nodes = as.character(1:10), edgemode="directed") > > g <- addEdge("1", "10", g, 1) > > combineNodes(as.character(1:5), g, "1") > Error in graph:::.normalizeEdges(from, to) : > 'from' must be length 1 or 1 for this call. > > > > combineNodes(c("1","2"), g, "X") > Error in graph:::.normalizeEdges(from, to) : > 'from' must be length 1 or 1 for this call. > > > Thanks, > Michael > -- Florian Hahne, PhD Computational Biology Program Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-3148 fhahne at fhcrc.org
ADD COMMENT

Login before adding your answer.

Traffic: 877 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6