Last chance! 50% off unlimited learning
Sale ends in
kcores
calculates the k-core structure of the input network, using the centrality measure indicated in cmode
.
kcores(dat, mode = "digraph", diag = FALSE, cmode = "freeman",
ignore.eval = FALSE)
A vector containing the maximum core membership for each vertex.
one or more (possibly valued) graphs.
"digraph"
for directed data, otherwise "graph"
.
logical; should self-ties be included in the degree calculations?
the degree
centrality mode to use when constructing the cores.
logical; should edge values be ignored when computing degree?
Carter T. Butts buttsc@uci.edu
Let
Degree-based k-cores are a simple tool for identifying well-connected structures within large graphs. Let the core number of vertex
The kcores
function produces degree-based k-cores, for various degree measures (with or without edge values). The return value is the vector of core numbers for NA
) edge are removed for purposes of the degree calculation.
Batagelj, V. and Zaversnik, M. (2002). “An
Batagelj, V. and Zaversnik, M. (2002). “Generalized Cores.” arXiv:cs/0202039v1
Wasserman, S. and Faust,K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
degree
#Generate a graph with core-periphery structure
cv<-runif(30)
g<-rgraph(30,tp=cv%o%cv)
#Compute the k-cores based on total degree
kc<-kcores(g)
kc
#Plot the result
gplot(g,vertex.col=kc)
Run the code above in your browser using DataLab