View source: R/core identification.R
| k.shell | R Documentation | 
K-shell decomposition
k.shell(graph, start.level = 0, verbose = FALSE)
graph | 
 a graph from igraph  | 
start.level | 
 the decomposition process starts at this level or minimum degree  | 
verbose | 
 if TRUE shows the progress  | 
a numeric vector
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.