Skip to content

rnndescent

0.2.0Package record

Nearest Neighbor Descent Method for Approximate Nearest Neighbors

2packages dependsuggested by 1
41.3Kdownloads / year
96.3%test coverage
13/13flavors OK

Overview

About

The Nearest Neighbor Descent method for finding approximate nearest neighbors by Dong and co-workers (2010) doi:10.1145/1963405.1963487. Based on the 'Python' package 'PyNNDescent' https://github.com/lmcinnes/pynndescent.

Changes in 0.2.0

New features

  • Add haversine metric for 2D latitude/longitude data in radians. This is

one of the metrics that was in PyNNDescent but I neglected to add to

rnndescent for its initial release. Thank you to

Josiah Parry whose request nudged me to fill

this gap (<https://github.com/jlmelville/rnndescent/issues/17>).

Bug fixes and minor improvements

  • Much improved input validation.
  • Non-dgCMatrix sparseMatrix inputs, such as dgRMatrix and dgTMatrix are

now normalized to dgCMatrix on input. Other matrices fail with a clearer error.

  • Fix for prepare_search_graph() sometimes over-pruning beyond max_degree.
  • Fix explicit-margin RP-tree builds for metric = "dice" and "hamming" to
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0

use angular split geometry.

  • Fix for rpf_build(obs = "C") where default n_trees used the number of

features not the number of observations.

  • Fix nnd_knn() and graph_knn_query() sometimes failing to completely randomly fill

the initial search graph when needed.

  • Fix for prepare_search_graph(prune_reverse = TRUE) not pruning reverse edges

when diversify_prob = 0.

  • Fix for edge case when max_search_fraction would only result in one

calculation, but this distance was never used.

  • Fixes for k_occur() when using graphs with missing data and sparse graphs

with anti-hubs.

  • Verbose query summaries now report the correct minimum and average number of

distance calculations.

  • Minor parallel execution robustness improvements: errors propagate back to R

and some worker launches are avoided with small workloads.

  • Minor C++ portability improvements for CRAN builds and high-dimensional

logical metrics.

  • Some C++ changes to avoid a (probably false positive) gcc16 compiler warning

found by CRAN checks.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 6.0 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-05-31
  • WARNING12 OK, 1 WARNING2026-05-13
  • OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
  • NOTE12 OK, 2 NOTE2026-04-22
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.2.0
README· In the repository, left out of the releaseVignettesYes · 7 · dynamicNEWSYes · 100% structured · mentions 0.2.0Citation fileNoWebsiteYes · pkgdown

The repository also keeps web-only articles.

Help pages
18 (1 internal)includes a package overview page
Examples that run
100%17 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
61%

Downloads

41.3K
CRAN downloads in the past year
Rank #2,228 · ~113/day · ~3.4K/mo
Daily download trend is not available in this view yet.
2.4K30 days
7.6K90 days
41.3K1 year
Compare downloads with other packages →
Also on440 r2u10 autocran

Repository

17Stars
2Forks
1Open issues
2Open PRs
23Releases
1,215Commits
3Commit identities
rapproximate-nearest-neighbor-search
License file reads as GPL-3.0 · 1,215 commits · Last activity 2026-10-18 · 0% stars, 30d · Default branch at 0.2.0.9000, ahead of CRAN 0.2.0 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
96%
Median days to close, 50 most recently updated closed issues
168
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-04-25 · 122026-07-25 · 17
PracticesBeta

12 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/jlmelville/rnndescent on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-10 · The repository has a site deploy workflow

pkgdown site last built 2026-10-10

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (1)
cran-comments.md
Show all practicesHide 2 practices
Automation and maintenance (1)
Dependabot
Lint, format, editor (4)
lintrLint workflowAirRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing rnndescent adds 4 packages (3 with compiled code, 16 MB of source tarballs). Heaviest: BH 14 MB, Rcpp 1.8 MB, dqrng 261 KB.

Depends (0)
none
Imports (4)
dqrngMatrixmethodsRcpp
LinkingTo (4)
Enhances (0)
none
Reverse dependencies
2direct
1indirect
Imports 2
Suggested by 1
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (3)
Author, Maintainer since 0.1.1 (2023), Copyright holder
Contributor
Contributor · added in 0.1.5
Releases (7)

Pick two releases to compare their code metrics.

Package metadata

First published
2023-11-27
Total releases
7 / 3 yrs
License
GPL (>= 3) OSI
Download size
349 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rnndescent")
Melville, J., Spinu, V., & Stubner, R. (2026). rnndescent: Nearest Neighbor Descent Method for Approximate Nearest Neighbors (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.rnndescent

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 rnndescent version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, 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