These functions return values or vectors relating to how connected a network is and the number of nodes or edges to remove that would increase fragmentation.

  • net_density() measures the ratio of ties to the number of possible ties.

  • net_components() measures the number of (strong) components in the network.

  • net_cohesion() measures the minimum number of nodes to remove from the network needed to increase the number of components.

  • net_adhesion() measures the minimum number of ties to remove from the network needed to increase the number of components.

  • net_diameter() measures the maximum path length in the network.

  • net_length() measures the average path length in the network.

  • net_independence() measures the independence number, or size of the largest independent set in the network.

net_density(.data)

net_components(.data)

net_cohesion(.data)

net_adhesion(.data)

net_diameter(.data)

net_length(.data)

net_independence(.data)

Arguments

.data

An object of a manynet-consistent class:

  • matrix (adjacency or incidence) from {base} R

  • edgelist, a data frame from {base} R or tibble from {tibble}

  • igraph, from the {igraph} package

  • network, from the {network} package

  • tbl_graph, from the {tidygraph} package

Cohesion

To get the 'weak' components of a directed graph, please use manynet::to_undirected() first.

References

On cohesion

White, Douglas R and Frank Harary. 2001. "The Cohesiveness of Blocks In Social Networks: Node Connectivity and Conditional Density." Sociological Methodology 31(1): 305-59. doi:10.1111/0081-1750.00098

Examples

net_density(ison_adolescents)
#> [1] 0.357
net_density(ison_southern_women)
#> [1] 0.353
  net_components(fict_thrones)
#> [1] 130
  net_components(to_undirected(fict_thrones))
#> [1] 2
net_cohesion(ison_marvel_relationships)
#> [1] 0
net_cohesion(to_giant(ison_marvel_relationships))
#> [1] 5
net_adhesion(ison_marvel_relationships)
#> [1] 0
net_adhesion(to_giant(ison_marvel_relationships))
#> [1] 5
net_diameter(ison_marvel_relationships)
#> [1] 3
net_diameter(to_giant(ison_marvel_relationships))
#> [1] 3
net_length(ison_marvel_relationships)
#> [1] 1.62
net_length(to_giant(ison_marvel_relationships))
#> [1] 1.62
net_independence(ison_adolescents)
#> [1] 4