|
From: | Tobias Heckmann |
Subject: | Re: [igraph] R igraph: get.shortest.paths returns error |
Date: | Wed, 08 Aug 2012 09:25:33 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
Dear Tamas, in the original version of my script (which worked on my old machine), startnode is a simple R vector: > str(startnode) num 177822 while tonodes seems to be a vector sequence: >str(tonodes) Class 'igraph.vs' atomic [1:286] 157812 158206 158605 158989 159367 ... ..- attr(*, "env")=<environment: 0x1013523c>in ?get.shortest.paths, it reads that the "to" argument should be a "numeric vector, the vertices to which the shortest paths will be calculated..." Hence, I also tried as.numeric(tonodes) in the "to" argument, but the error remains the same.
Cheers, Tobias Am 08/08/2012 08:43, schrieb Tamas Nepusz:
Dear Tobias,Until today, the following command worked well: paths<-get.shortest.paths(graph,from=startnode,to=tonodes,mode="out",weights=NA,output="epath") Today, I installed R on a 64bit machine and tried running my script again. This time, the command returned the following error: "At structural_properties.c:659 : Size of the `vertices' and the `to' should match, Invalid value"I have tried this now on a random graph with random start and end nodes and it seemed to work for me, so can you please let us know what is there in the "startnode" and "tonodes" variables? Are they simple R vectors? Cheers, Tamas _______________________________________________ igraph-help mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/igraph-help
-- --- Dr. Tobias Heckmann Wiss. Angestellter Lehrstuhl für Physische Geographie Katholische Universität Eichstätt-Ingolstadt Ostenstraße 18 85072 Eichstätt Tel.: 08421-93-1309 Fax: 08421-93-1787
[Prev in Thread] | Current Thread | [Next in Thread] |