Learn R Programming

SemNeT (version 2.0.0)

cc: Clustering Coefficient

Description

Computes the global clustering coefficient (CC) of a network

Usage

cc(A, weighted = FALSE)

CC(A, weighted = FALSE)

Value

Returns the network's CC. The per-node clustering coefficient is attached as the "node" attribute, rather than being computed and discarded

Arguments

A

Matrix or data frame. An adjacency matrix of network data

weighted

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

Author

Alexander Christensen <[email protected]>

References

Rubinov, M., & Sporns, O. (2010). Complex network measures of brain connectivity: Uses and interpretations. NeuroImage, 52, 1059-1069.

Examples

Run this code
# Pearson's correlation only for CRAN checks
fluency_data <- matrix(sample(0:1, 1000, replace = TRUE), nrow = 100, ncol = 10)
A <- suppressWarnings(tmfg(similarity(fluency_data, method = "cor")))

# Unweighted
network_cc <- cc(A)

Run the code above in your browser using DataLab