comm.str: Community Strength/Degree Centrality

comm.strR Documentation

Community Strength/Degree Centrality

Description

Computes the community strength/degree centrality measure of each community in a network or computes the strength/degree centrality measure of each community's connections to the other communities

Usage

comm.str(A, comm, weighted = TRUE, measure = c("within", "between"))

Arguments

A

An adjacency matrix of network data

comm

A vector corresponding to the community each node belongs to

weighted

Is the network weighted? Defaults to TRUE. Set to FALSE for weighted measures

measure

Type of measure to compute:

  • "within" — Computes the community strength or degree of nodes within its own community

  • "between" — Computes the community strength or degree of nodes outside of its own community

Value

A vector of community strength/degree centrality values for each specified community in the network (larger values suggest more central positioning)

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

# Pearson's correlation only for CRAN checks
A <- TMFG(neoOpen, normal = FALSE)$A

comm <- igraph::walktrap.community(convert2igraph(abs(A)))$membership

#Strength
within.ns <- comm.str(A, comm, measure = "within")
between.ns <- comm.str(A, comm, measure = "between")

#Degree
within.deg <- comm.str(A, comm, weighted = FALSE, measure = "within")
between.deg <- comm.str(A, comm, weighted = FALSE, measure = "between")


NetworkToolbox documentation built on June 8, 2025, 11:40 a.m.