Learn R Programming

NetworkToolbox (version 1.2.2)

comm.str: Community Strength/Degree Centrality

Description

Computes the community strength/degree centrality measure of each community in a network

Usage

comm.str(A, comm, weighted = TRUE)

Arguments

A

An adjacency matrix of network data

comm

A vector or matrix corresponding to the community each node belongs to

weighted

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

Value

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

Examples

Run this code
# NOT RUN {
A <- TMFG(neoOpen)$A

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

#Strength
result <- comm.str(A, comm)

#Degree
result <- comm.str(A, comm, weighted = FALSE)

# }

Run the code above in your browser using DataLab