Spectral Modularity Clustering
Overview
Implements the network clustering algorithm described in Newman (2006) doi:10.1103/PhysRevE.74.036104. The complete iterative algorithm comprises of two steps. In the first step, the network is expressed in terms of its leading eigenvalue and eigenvector and recursively partition into two communities. Partitioning occurs if the maximum positive eigenvalue is greater than the tolerance (10e-5) for the current partition, and if it results in a positive contribution to the Modularity. Given an initial separation using the leading eigen step, 'rSpectral' then continues to maximise for the change in Modularity using a fine-tuning step - or variate thereof. The first stage here is to find the node which, when moved from one community to another, gives the maximum change in Modularity. This node’s community is then fixed and we repeat the process until all nodes have been moved. The whole process is repeated from this new state until the change in the Modularity, between the new and old state, is less than the predefined tolerance. A slight variant of the fine-tuning step, which can improve speed of the calculation, is also provided. Instead of moving each node into each community in turn, we only consider moves of neighbouring nodes, found in different communities, to the community of the current node of interest. The two steps process is repeatedly applied to each new community found, subdivided each community into two new communities, until we are unable to find any division that results in a positive change in Modularity.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-04
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-03-10
Documentation
- Help pages
- 4includes a package overview page
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 25% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 13
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/cmclean5/rspectral on 2026-10-18.
Dependencies
Installing rSpectral adds 13 packages (9 with compiled code, 12 MB of source tarballs). Heaviest: igraph 4.8 MB, Rcpp 1.8 MB, rbibutils 1.1 MB. 1 more not on CRAN is not measured.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0.16Latest
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2025-12-07
- 1.0.0.142025-12-07 · diff ↗
- archivedRemoved from CRAN2025-11-27issues were not corrected despite reminders
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.0.102023-01-18 · diff ↗
- 1.0.0.92022-08-19
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-08-19
- Total releases
- 4 / 4 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 644 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("rSpectral")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.3390/proteomes6030031.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.