[R] Problem with shortestPath in igraph and qgraph

Zahra Tofighi tofighizahra at gmail.com
Tue Jun 20 20:15:23 CEST 2017


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:


shp<-matrix(1:ncol(tmp3),ncol(tmp3),1)for(i in ncol(tmp3)){

when I display the valu of shp the result is same as initial value (form
one to ncol). I also test with shortest.paths function. the result was
same. what is my wrong?

	[[alternative HTML version deleted]]

More information about the R-help mailing list