weight_distribution {smallstuff} | R Documentation |
Weight Distribution of a Graph
Description
Obtain the weight distribution of a graph, indicating for each strength from zero to the maximum strength of any vertex, the proportion of vertices with such a strength. This assumes positive integer weights.
Usage
weight_distribution(g, cumulative = FALSE, ...)
Arguments
g |
the graph (an igraph object) |
cumulative |
|
... |
additional parameters to be passed to the igraph function
|
Value
A vector with the weighted degree distribution for the graph
g
.
Examples
g=igraph::graph_from_literal(1-2,2-3:4,3-4:5:6,5-1)
igraph::E(g)$weight=c(1,2,1,4,2,1,1)
table(igraph::strength(g))/6
weight_distribution(g)
[Package smallstuff version 1.0.3 Index]