Tools for Working with Multidimensional Data

Provides various tools for working with multidimensional data in R and C++, including extremely fast nearest-neighbor- and range- queries without the overhead of linked tree nodes.


The kdtools package exports a C++ header implementing sorting and searching on ranges of tuple-like objects without using trees. It is based on a kd-tree-like recursive sorting algorithm. Once sorted, one can perform a range- or nearest-neighbor- query. More details are here. Methods and benchmarks are here.

library(kdtools)
x = kd_sort(matrix(runif(400), 200))
plot(x, type  = 'l', asp = 1, axes = FALSE, xlab = NA, ylab = NA)
points(x, pch = 19, col = rainbow(200, alpha = 0.25), cex = 2)
y = kd_range_query(x, c(1/4, 1/4), c(3/4, 3/4))
points(y, pch = 19, cex = 0.5, col = "red")

CRAN status Travis build status AppVeyor build status Coverage status DOI

News

kdtools 0.3.1

  • Additional bug fixes

kdtools 0.3.0

  • Bug fix in lower/upper_bound

kdtools 0.2.0

  • For upload to CRAN

kdtools 0.1.1

  • Added a NEWS.md file to track changes to the package.
  • Fixed a bug in vignette building

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("kdtools")

0.4.1 by Timothy Keitt, 5 months ago


https://github.com/thk686/kdtools


Report a bug at https://github.com/thk686/kdtools/issues


Browse source code at https://github.com/cran/kdtools


Authors: Timothy Keitt [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports Rcpp

Suggests testthat, knitr, rmarkdown, covr, ggplot2, tidytext, printr, scales

Linking to Rcpp, strider, BH


See at CRAN