Skip to content

mstknnclust

1.0.0Package record

MST-kNN Clustering Algorithm

0packages dependsuggested by 1
4.2Kdownloads / year
86.3%test coverage
13/13flavors OK

Overview

About

Implements the MST-kNN clustering algorithm proposed by Inostroza-Ponta (2008) https://trove.nla.gov.au/work/28729389. The algorithm determines the number of clusters automatically by recursively intersecting the Minimum Spanning Tree (MST) and the k-Nearest Neighbor (kNN) proximity graphs constructed from a pairwise distance matrix. The value of k is selected via a connectivity criterion (the smallest k such that the kNN graph is connected, bounded by floor(log(n))). The package requires only a distance matrix as input and returns cluster assignments, an 'igraph' network, and partition metadata.

Changes in 1.0.0
  • First major release.
  • kNN construction uses a partial-sort approach that stores only floor(log(n)) neighbours per node, yielding O(n^2 log n) time and O(n * log(n)) working memory.
  • MST is computed via igraph::mst() on a sparse edge list constructed from integer index vectors.
  • All deprecated igraph function calls replaced with modern equivalents (components(), intersection(), is_connected(), etc.).
  • Package structure reorganised following R Packages (2e) conventions: one file per exported function, testthat test suite, pkgdown site.
  • Computational performance benchmarks added (see inst/extdata/benchmark_performance.R).
  • Added pkgdown website at <https://jorgeklz.github.io/package-mstknnclust/>.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.5 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.0.0
READMEYes · 82 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.0.0Citation fileNoWebsiteYes · pkgdown
Help pages
5 (2 internal)
Examples that run
100%1 run in a plain check
Exported functions with examples
33%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
40%

Downloads

4.2K
CRAN downloads in the past year
Rank #8,593 · ~12/day · ~351/mo
Daily download trend is not available in this view yet.
35730 days
1.1K90 days
4.2K1 year
Compare downloads with other packages →
Also on81 r2u4 autocran

Repository

1Stars
1Forks
0Open issues
0Open PRs
0Releases
1Commits
1Commit identities
1 commits · Last activity 2026-05-11
Responsiveness
not measured

Stars over time

2023-02-09 · 12026-07-07 · 1
PracticesBeta

3 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/jorgeklz/package-mstknnclust on 2026-10-22.

Docs source (2)
pkgdown

GitHub Pages site last deployed 2026-05-12

pkgdown site last built 2026-05-11, before release 1.0.0 (2026-05-13)

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing mstknnclust adds 9 packages (6 with compiled code, 8.0 MB of source tarballs). Heaviest: igraph 4.8 MB, vctrs 1.0 MB, rlang 766 KB.

Depends (1)
R >= 3.5.0
Imports (1)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (3)
Author, Maintainer · added in 1.0.0
Author · added in 1.0.0
Author · added in 1.0.0

Maintainer since 0.1.0 (2019)

Releases (6)

Pick two releases to compare their code metrics.

  • 1.0.0Latest
    record
    2026-05-13 · current release · diff ↗ ·
    removed 4 exports
    compute.costs.proximity.graph, generate.complete.graph, generate.knn, generate.mst
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.3.2
    record
    2023-01-27 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.3.1
    record
    2020-09-17 · diff ↗
  • 0.3.0
    record
    2020-07-14 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.0
    record
    2019-12-05 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.0
    record
    2019-02-06
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2019-02-06
Total releases
6 / 7 yrs
License
GPL-2 OSI
Minimum R
≥ 3.5.0
Bundled data
217 KB / 2 files
Download size
339 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("mstknnclust")
Parraga-Alava, J., Inostroza-Ponta, M., & Moscato, P. (2026). mstknnclust: MST-kNN Clustering Algorithm (Version 1.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.mstknnclust

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for mstknnclust version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy