graphComponents: Find clusters, and return node characteristics.

Description Usage Arguments Value Examples

View source: R/edgefinder.R

Description

Take an adjacency Matrix as input and find clusters. For each node, find the degree and clustering coefficient (CC). Then, calculate a centrality measure (type\*CC+1)\*deg. For type=0, it's just the degree. Note that setting type=1 we assign a higher value to nodes that not only have many neighbors, but the neighbors are highly interconnected. For example, suppose we have two components with k nodes, one has a star shape, and the other is a complete graph. With type=0 both graphs will get the same value, but with type=1 the complete graph will be picked by the algorithm first. Setting type to a negative value gives CC\*deg as the centrality measure.

Usage

1
graphComponents(A, minCtr = 5, type = 1)

Arguments

A

An adjacency Matrix(0/1).

minCtr

The minimum centrality value to be considered for a cluster center (default=5).

type

Determines how the centrality measure is computed.

Value

A data frame with the following columns

Examples

1
2
3
4
   data(SIM)
   Sres <- edgefinder(SIM, ttl = "hub network")
   SimComp <- graphComponents(Sres$AdjMat)
   head(SimComp)

haimbar/edgefinder documentation built on Dec. 20, 2021, 2:45 p.m.