k.shell: K-shell decomposition

View source: R/core identification.R

k.shellR Documentation

K-shell decomposition

Description

K-shell decomposition

Usage

k.shell(graph, start.level = 0, verbose = FALSE)

Arguments

graph

a graph from igraph

start.level

the decomposition process starts at this level or minimum degree

verbose

if TRUE shows the progress

Value

a numeric vector

Examples

data(den)
graph.all <- elite.network(den)
graph.com <- largest.component(graph.all)
sp        <- distances(graph.com)
sp[sp >= 2.1] <- 0
graph.reach     <- graph_from_adjacency_matrix(Matrix(sp), mode = "undirected", weighted = TRUE)
shell <- k.shell(graph.reach, start.level = 0, verbose = TRUE)
table(shell)

antongrau/eliter documentation built on March 2, 2024, 8:05 p.m.