[R] Problem with shortestPath in igraph and qgraph

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Jun 21 07:05:56 CEST 2017

Hard to follow data analysis without data. Try making your example reproducible [1][2][3] and post in plain text (a setting in your emailer). Read the Posting Guide mentioned in the footer to avoid other posting pitfalls. 

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html

Sent from my phone. Please excuse my brevity.

On June 20, 2017 11:15:23 AM PDT, Zahra Tofighi <tofighizahra at gmail.com> wrote:
>I have a graph and i use qgraph package to calculate centrality
>Now I want to know the maximum value of shortest path for each vertex
>discarding the Inf value in short pathes. For this I use the
>ShortestPathLengths of centrality function in qgraph. but when I want
>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
>one to ncol). I also test with shortest.paths function. the result was
>same. what is my wrong?
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list