search for: shortestpath

Displaying 7 results from an estimated 7 matches for "shortestpath".

2018 Feb 06
1
gdistance::shortestPath throws error "not a symmetric matrix"
Hi, Calling gdistance::shortestPath gives me the error Error in asMethod(object) : not a symmetric matrix; consider forceSymmetric() or symmpart() The output of dput(.traceback()) is pairlist("stop(\"not a symmetric matrix; consider forceSymmetric() or symmpart()\")", "asMethod(object)",...
2011 Aug 05
1
matrix into vector with vertex names
Using Igraph, I create shortest paths, then convert the matrix into three column vectors - "vertex1", "vertex2", "shortestpath" - as the code below shows. #code for generating shortest path matrix and creating a 3 columns from an igraph graph object "y" y_s<-shortest.paths(y, weights = NULL) y_s <- melt(y_s)[melt(upper.tri(y_s))$value,] #Step 2: this is where the trouble with memory occurs y_s[,1] &l...
2017 Jun 21
0
Problem with shortestPath in igraph and qgraph
...ofighi <tofighizahra at gmail.com> wrote: >hello, > >I have a graph and i use qgraph package to calculate centrality >parameters. >Now I want to know the maximum value of shortest path for each vertex >with >discarding the Inf value in short pathes. For this I use the >ShortestPathLengths of centrality function in qgraph. but when I want >to >get the maximum the result is wrong. here is my code: > >cen<-centrality(Q) > >tmp3<-cen$ShortestPathLengths >shp<-matrix(1:ncol(tmp3),ncol(tmp3),1)for(i in ncol(tmp3)){ >shp[i,]=max(tmp3[i,][tmp3[i,]!=In...
2017 Jun 20
2
Problem with shortestPath in igraph and qgraph
hello, I have a graph and i use qgraph package to calculate centrality parameters. Now I want to know the maximum value of shortest path for each vertex with discarding the Inf value in short pathes. For this I use the ShortestPathLengths of centrality function in qgraph. but when I want to get the maximum the result is wrong. here is my code: cen<-centrality(Q) tmp3<-cen$ShortestPathLengths shp<-matrix(1:ncol(tmp3),ncol(tmp3),1)for(i in ncol(tmp3)){ shp[i,]=max(tmp3[i,][tmp3[i,]!=Inf)} when I display the valu of...
2018 Feb 14
2
long vectors not supported yet
Hi, I am running R 3.3.3 and getting the following error: Error in add_edges(res, edges = t(as.matrix(el[, 1:2])), attr = weight) : long vectors not supported yet: ../../src/include/Rinlinedfuns.h:138 when passing a 13 GB TransitionLayer object to shortestPath from the package 'gdistance'. The error, albeit in a different context, is discussed here: https://github.com/tidyverse/readr/issues/309 https://github.com/tidyverse/readr/pull/433 However it is not clear to me quite what the fix was and what kind of limit may still exist in subseque...
2018 Feb 14
0
long vectors not supported yet
...; wrote: >Hi, > >I am running R 3.3.3 and getting the following error: > >Error in add_edges(res, edges = t(as.matrix(el[, 1:2])), attr = weight) >: > long vectors not supported yet: ../../src/include/Rinlinedfuns.h:138 > >when passing a 13 GB TransitionLayer object to shortestPath from the >package 'gdistance'. > >The error, albeit in a different context, is discussed here: > > https://github.com/tidyverse/readr/issues/309 > https://github.com/tidyverse/readr/pull/433 > >However it is not clear to me quite what the fix was and what kind of &...
2018 Feb 15
1
long vectors not supported yet
...running R 3.3.3 and getting the following error: >> >> Error in add_edges(res, edges = t(as.matrix(el[, 1:2])), attr = weight) >> : >> long vectors not supported yet: ../../src/include/Rinlinedfuns.h:138 >> >> when passing a 13 GB TransitionLayer object to shortestPath from the >> package 'gdistance'. >> >> The error, albeit in a different context, is discussed here: >> >> https://github.com/tidyverse/readr/issues/309 >> https://github.com/tidyverse/readr/pull/433 >> >> However it is not clear to me q...