Package: rSpectral
Type: Package
Title: Spectral Modularity Clustering
Version: 1.0.0.14
Authors@R: c(
    person("Colin", "Mclean", 
        email="Colin.D.Mclean@ed.ac.uk", role="aut", 
        comment ="algorithm implementation in Rcpp functions"), 
    person("Anatoly", "Sorokin", 
        email="lptolik@gmail.com", role=c("aut", "cre"),
        comment ="R functions, cranification, documentation, testing, maintenance"))
Description: 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. 
URL: https://github.com/cmclean5/rSpectral
BugReports: https://github.com/cmclean5/rSpectral/issues/
License: GPL-2
Encoding: UTF-8
RoxygenNote: 7.3.3
Depends: R (>= 3.5.0)
Imports: Rcpp (>= 1.0.8.3), Rdpack, igraph, graph
RdMacros: Rdpack
LinkingTo: Rcpp, RcppArmadillo(>= 0.11.2.0.0)
Suggests: RColorBrewer, Rgraphviz, igraphdata, testthat (>= 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: yes
Packaged: 2025-12-04 15:16:20 UTC; lptolik
Author: Colin Mclean [aut] (algorithm implementation in Rcpp functions),
  Anatoly Sorokin [aut, cre] (R functions, cranification, documentation,
    testing, maintenance)
Maintainer: Anatoly Sorokin <lptolik@gmail.com>
Repository: CRAN
Date/Publication: 2025-12-07 06:40:02 UTC
Built: R 4.5.2; x86_64-w64-mingw32; 2026-03-06 12:35:31 UTC; windows
Archs: x64
