get_degree_distribution {SeqNet} | R Documentation |
Get the degree distribution for a network.
Description
Counts the connections to each node within each structure. Note, this is not the same as the degree distribution from the adjacency matrix obtained from the network, which collapses the individual structures into one graph.
Usage
get_degree_distribution(network)
Arguments
network |
A network object. |
Value
A vector of length p, containing the degree for each node in the network.
Examples
set.seed(13245)
nw <- random_network(10)
deg <- get_degree_distribution(nw) # Degree of each node.
table(deg) # Frequency table of degrees.
# Five nodes have degree 2, three nodes have degree 3, etc.
[Package SeqNet version 1.1.3 Index]