ntcore
k-core of each node
ntcore(from, to, nodes = NULL)The coreness of a node is the largest k such that it belongs to a
subgraph in which every node has at least k neighbours (Seidman 1983),
computed in O(nodes + edges) by the algorithm of Batagelj and
Zaversnik. The cores are nested: the (k + 1)-core lies inside the
k-core (proof("ntcore")). Edges are taken as undirected, without
weights. Graph rules as in ntdeg().
Parameters
Section titled “Parameters”from, toLabels of the two ends of each edge: vectors of the same length (zero when
nodesgives every node) with no missing values.nodesNULL, or every node’s label once: the node order of the results and the way to include isolated nodes.
Returns
Section titled “Returns”A data frame: node, core.
References
Section titled “References”Seidman, S. B. (1983). Network structure and minimum degree. Social Networks, 5(3), 269-287. doi:10.1016/0378-8733(83)90028-X
Batagelj, V. and Zaversnik, M. (2003). An O(m) algorithm for cores decomposition of networks. doi:10.48550/arXiv.cs/0310049
Examples
Section titled “Examples”ntcore(c(1, 1, 1, 2, 2, 3, 4), c(2, 3, 4, 3, 4, 4, 5))Generated from the R help page: ntcore in the R reference.