centrality_coreness: K-Core Decomposition (Coreness)

View source: R/centrality.R

centrality_corenessR Documentation

K-Core Decomposition (Coreness)

Description

Assigns each node to its maximum k-core. A k-core is a maximal subgraph where every node has at least k connections within the subgraph.

Usage

centrality_coreness(x, mode = "all", ...)

Arguments

x

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

mode

For directed networks: "all" (default), "in", or "out".

...

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

Value

Named numeric vector of coreness values.

See Also

centrality for computing multiple measures at once.

Examples

adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_coreness(adj)

cograph documentation built on April 1, 2026, 1:07 a.m.