Dear Fabio, Thanks for the report; this has already been fixed in the development version and the fix will be included in the next release:
https://github.com/igraph/igraph/issues/257 All the best, Tamas On 3 Sep 2013, at 20:15, Fabio Daolio <[email protected]> wrote: > Dear all, > > I'm not familiar with bug reporting and tracking, thus my apologies for > spamming the help-list. > Anyway, I noticed that the "degree.distribution" function returns "NULL" > under R v3.0.1. > > I think this might be due to the fact that the "hist" function, which is > called, returns an object > that doesn't have an "intensity" component anymore (since R 3.0.0). > Could that be? > > A temporary fix might be to define your own function: > degree.distribution<-function (graph, cumulative = FALSE, ...) > { > if (!is.igraph(graph)) { > stop("Not a graph object") > } > cs <- degree(graph, ...) > hi <- hist(cs, -1:max(cs), plot = FALSE)$density > if (!cumulative) { > res <- hi > } > else { > res <- rev(cumsum(rev(hi))) > } > res > } > > Cheers, > -- > Fabio > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
