Unable to replicate result using degree.distribution igraph function

I found this very simple example online:

library(igraph) g <- graph.ring(5) plot(g) summary(g) degree.distribution(g) 

I got the same results before degree.distribution(g) , and instead of [1] 0 0 1 I get NULL .

Since I have exactly the same problem with this example (NULL result for degree.distribution function instead of [1] 0.135 0.280 0.315 0.110 0.095 0.050 0.005 0.010 ). Interestingly, the problem could be in installing the package.

0
source share
1 answer

The degree.distribution function in igraph 0.6.5 does not work with R 3.0.0 and newer due to some changes in the return value of the hist function in R. The developers already know about this , and this will be fixed in the next release. Until it is released, you will have to work around the error by changing the source code of the degree.distribution function to match this patch .

0
source

All Articles