ig.degree.betweenness
June 17, 2026 · View on GitHub
An R package for the implementation of the "Smith-Pittman" (2024) community detection algorithm. Also known as the node degree+edge betweenness algorithm. Compatible with the igraph ecosystem.
- For the Python implementation, see
ig_degree_betweenness_py. - For the C implementation, see
ig_degree_betweenness_c
Algorithm Visualizations
How the Smith-Pittman algorithm works:
Installing this package
To install the stable release of this package from CRAN run:
install.packages("ig.degree.betweenness")
To install the development version of this package run:
# install.packages("devtools")
devtools::install_github("benyamindsmith/ig.degree.betweenness")
Sample Usage
Applying the node degree+edge betweenness algorithm can be done by making use of the cluster_degree_betweenness().
An example of using the code is:
library(igraphdata)
library(ig.degree.betweenness)
data("karate")
sp <- cluster_degree_betweenness(karate)
plot(
sp,
karate,
main= "Node degree+edge betweenness clustering"
)
Citation
To cite package ‘ig.degree.betweenness’ in publications use:
Smith B, Pittman T, Xu W (2024). “Centrality in Collaboration: community detection for oncology researchers.” University of Toronto Journal of Public Health, 5(1). doi:10.33137/utjph.v5i1.44130
Smith B, Pittman T, Xu W (2026). “Detecting communities when order and direction matter in social network analysis.” Canadian Journal of Statistics, n/a(n/a), e70060. doi:10.1002/cjs.70060
A BibTeX entry for LaTeX users is
@Article{Smith_Pittman_Xu_2024,
title = {Centrality in Collaboration: community detection for oncology researchers},
author = {Benjamin Smith and Tyler Pittman and Wei Xu},
journal = {University of Toronto Journal of Public Health},
volume = {5},
number = {1},
year = {2024},
month = {nov},
doi = {10.33137/utjph.v5i1.44130},
url = {https://utjph.com/index.php/utjph/article/view/44130},
}
@Article{Smith_Pittman_Xu_2026,
title = {Detecting communities when order and direction matter in social network analysis},
author = {Benjamin Smith and Tyler Pittman and Wei Xu},
journal = {Canadian Journal of Statistics},
volume = {n/a},
number = {n/a},
pages = {e70060},
year = {2026},
doi = {https://doi.org/10.1002/cjs.70060},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/cjs.70060},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/cjs.70060},
keywords = {Community detection, directed networks, edge betweenness, modularity, node degree},
}