| net_aggregate_weights | R Documentation |
Aggregates a vector of edge weights using various methods. Compatible with igraph's edge.attr.comb parameter.
net_aggregate_weights(w, method = "sum", n_possible = NULL)
w |
Numeric vector of finite edge weights. |
method |
Single aggregation method: "sum", "mean", "median", "max",
"min", "prod", "density", or "geomean". Because zeros are stripped first,
|
n_possible |
Optional single finite numeric number of possible edges
for density calculation. When omitted, |
Single aggregated value
w <- c(0.5, 0.8, 0.3, 0.9)
net_aggregate_weights(w, "sum") # 2.5
net_aggregate_weights(w, "mean") # 0.625
net_aggregate_weights(w, "max") # 0.9
net_aggregate_weights(w, "density", n_possible = 9) # 2.5 / 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.