get_degree_distribution: Get the degree distribution for a network.

Description Usage Arguments Value Examples

View source: R/networks.R

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

1

Arguments

network

A network object.

Value

A vector of length p, containing the degree for each node in the network.

Examples

1
2
3
4
5
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.

SeqNet documentation built on July 9, 2021, 9:08 a.m.