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

Reply via email to