Learn R Programming

SeqNet (version 1.1.3)

get_degree_distribution: 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

Run this code
# NOT RUN {
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.
# }

Run the code above in your browser using DataLab