View source: R/network-summary.R
| network_summary | R Documentation |
Computes network-level statistics and returns them as a one-row data frame. The basic set covers size, density, connectivity, path lengths, centralization, transitivity, reciprocity and degree assortativity.
network_summary(
x,
directed = NULL,
weighted = TRUE,
mode = "all",
loops = TRUE,
simplify = "sum",
detailed = FALSE,
extended = FALSE,
digits = 3,
shared_nodes = FALSE,
...
)
x |
Network input: matrix, igraph, network, cograph_network, or tna object |
directed |
Logical or NULL. If NULL (default), auto-detect from matrix symmetry. Set TRUE to force directed, FALSE to force undirected. |
weighted |
Logical. Use edge weights for strength, shortest-path, and centrality calculations where the underlying igraph routine accepts them. Default TRUE. |
mode |
For directed networks: "all", "in", or "out". Used by the
degree, strength and closeness statistics added by |
loops |
Logical. If TRUE (default), keep self-loops. Set FALSE to remove them. |
simplify |
How to combine multiple edges between the same node pair. Options: "sum" (default), "mean", "max", "min", or FALSE/"none" to keep multiple edges. |
detailed |
Logical. If TRUE, add 11 summary statistics of node-level centralities to the 16 basic metrics. Default FALSE. |
extended |
Logical. If TRUE, add 8 structural metrics (girth, radius, vertex connectivity, clique size, cut vertices, bridges, global and local efficiency). Default FALSE. |
digits |
Integer. Round numeric results to this many decimal places. Default 3. NULL skips rounding. |
shared_nodes |
Logical. Only used when |
... |
Additional arguments (currently unused) |
A data frame with one row. For a group network object, one row
per group with a leading group column; a group with no node of its
own keeps the common node set and raises a cograph_empty_group warning.
The basic measures are always computed:
Number of nodes in the network
Number of edges in the network
Edge density (proportion of possible edges)
Number of connected components
Longest shortest path in the network
Average shortest path length
Minimum number of edges whose removal disconnects the network. Edge weights are not used.
Degree centralization over all ties (0-1)
In-degree centralization (directed only)
Out-degree centralization (directed only)
Betweenness centralization (0-1)
Closeness centralization (0-1)
Eigenvector centralization (0-1)
Global clustering coefficient
Proportion of mutual edges (directed only)
Degree assortativity coefficient
The extended measures are added when extended = TRUE:
Length of shortest cycle (Inf if acyclic)
Minimum eccentricity over all nodes
Minimum nodes to remove to disconnect graph
Size of the largest complete subgraph
Number of articulation points (cut vertices)
Number of bridge edges
Average inverse shortest path length
Average local efficiency across nodes
The detailed measures are added when detailed = TRUE:
Degree distribution statistics
Weighted degree statistics
Average betweenness centrality
Average closeness centrality
Average eigenvector centrality
Average PageRank
Average Burt's constraint
Average local clustering coefficient
network_summary(regulation_net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.