igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] R igraph: get.shortest.paths returns error


From: Tobias Heckmann
Subject: Re: [igraph] R igraph: get.shortest.paths returns error
Date: Wed, 08 Aug 2012 16:44:02 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0

hm, I've tried your code snippet with both machines.

First my "old" one:

>sessionInfo()

R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C LC_TIME=English_United Kingdom.1252

attached base packages:
[1] tcltk stats graphics grDevices utils datasets methods base

other attached packages:
[1] RSAGA_0.93-1 plyr_1.7.1 shapefiles_0.6 foreign_0.8-50 gstat_1.0-12 spacetime_0.7-0 xts_0.8-6 zoo_1.7-7 sp_0.9-99 sqldf_0.4-6.4 [11] RSQLite.extfuns_0.0.1 RSQLite_0.11.1 chron_2.3-42 gsubfn_0.6-3 proto_0.3-9.2 DBI_0.2-5 Matrix_1.0-6 lattice_0.20-6 igraph_0.6-2

loaded via a namespace (and not attached):
[1] grid_2.15.1

The snippet returns >50 warnings with respect to "couldn't reach some vertices", but no error

---------------------------------------------------------------------------------------------------

Now my "new" computer:

>sessionInfo()

R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252 LC_NUMERIC=C LC_TIME=German_Germany.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods base

other attached packages:
[1] igraph_0.6-2

loaded via a namespace (and not attached):
[1] tools_2.15.1

here, the snippet returns again the error
"At structural_properties.c:659 : Size of the `vertices' and the `to' should match, Invalid value"

-------------
I'd like to point out that the only differences I can see are the Patform and the Locale. Both machines use the same R (2.15.1) and igraph (0.6-2) versions.
So I can't confirm that it is a matter of the R version...

Thank you anyway for your help !
Cheers
Tobias


Am 08/08/2012 16:34, schrieb Gábor Csárdi:
Thanks for the report! I cannot reproduce this on OSX and R 2.15.1, using

for (i in 1:10000) {
   g <- grg.game(100, 0.2)
   get.shortest.paths(g, from=1, to=c(2,3,4,5), output="epath")
}

So I am not sure what is happening here. I am running OS X 10.6.8,
btw, and igraph 0.6-2, of course.

G.

On Wed, Aug 8, 2012 at 5:19 AM, Tamas Nepusz <address@hidden> wrote:
Dear Tobias,

Thanks for the feedback. It seems that your problem is version-specific,
i.e. it occurs with igraph in R 2.15.1 (confirmed on Mac OS X) but not in R
2.14.1 (confirmed on Linux). I have created a bug report for this and
assigned it to Gabor, the developer of the R interface. You can subscribe to
the bug report on the following page if you would like to be notified when
this is fixed:

https://bugs.launchpad.net/igraph/+bug/1034312

Best,
Tamas


On 08/08/2012 10:56 AM, Tobias Heckmann wrote:
Dear Tamas,

my RData file is unfortunately too large to send (43 MB).
I have now tried a random graph, and get.shortest.paths returns the same
error... Hence, it doesn't seem to depend on my data. I've attached the
RData file for my graph and my sessionInfo.

Thank you very much for dealing with my problem !
Best regards
Tobias


Am 08/08/2012 09:48, schrieb Tamás Nepusz:
Dear Tobias,

This is strange; I still cannot reproduce your issue on my machine, neither with "ordinary" R 
vectors nor with vertex sequences. Could you send me an Rdata file with an example graph and a 
"startnode" and "tonodes" vector that causes problems on your machine?

Best,--
T.


On Wednesday, 8 August 2012 at 09:25, Tobias Heckmann wrote:

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 (mailto: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


_______________________________________________
igraph-help mailing list
address@hidden (mailto:address@hidden)
https://lists.nongnu.org/mailman/listinfo/igraph-help


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]