Learn R Programming

cograph (version 2.0.0)

centrality_transitivity: Local Transitivity (Clustering Coefficient)

Description

Proportion of triangles around each node relative to the number of possible triangles. Measures how tightly clustered a node's neighborhood is.

Usage

centrality_transitivity(x, transitivity_type = "local", isolates = "nan", ...)

Value

Named numeric vector of transitivity values.

Arguments

x

Network input (matrix, igraph, network, cograph_network, tna object).

transitivity_type

Type of transitivity: "local" (default), "global", "undirected", "localundirected", "barrat" (weighted), or "weighted".

isolates

How to handle isolate nodes: "nan" (default) or "zero".

...

Additional arguments passed to centrality (e.g., weighted, directed).

See Also

centrality for computing multiple measures at once.

Examples

Run this code
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_transitivity(adj)

Run the code above in your browser using DataLab