Tools for Distance Metrics

Provides tools for constructing, manipulating and using distance metrics.


CRAN Status Build Status Build status codecov

The distances package provides tools for constructing, manipulating and using distance metrics in R. It calculates distances only as needed (unlike the standard dist function which derives the complete distance matrix when called). This saves memory and can increase speed. The package also includes functions for fast nearest and farthest neighbor searching.

How to install

distances is on CRAN and can be installed by running:

install.packages("distances")

How to install development version

It is recommended to use the stable CRAN version, but the latest development version can be installed directly from Github using devtools:

if (!require("devtools")) install.packages("devtools")
devtools::install_github("fsavje/distances")

The package contains compiled code, and you must have a development environment to install the development version. (Use devtools::has_devel() to check whether you do.) If no development environment exists, Windows users download and install Rtools and macOS users download and install Xcode.

News

distances 0.1.6

  • Fixes incompatibility error with Sun make.

distances 0.1.5

  • Fixes compilation errors for C++ code on Solaris.

distances 0.1.4

  • Update R dependency

distances 0.1.3

  • Adds extract methods []
  • Updates maintainer information

distances 0.1.2

  • Fixes minor compilation errors on Solaris.

distances 0.1.1

  • Makes C-code POSIX compliant so package builds on Solaris.

distances 0.1.0

  • Initial release.

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("distances")

0.1.7 by Fredrik Savje, a month ago


https://github.com/fsavje/distances


Report a bug at https://github.com/fsavje/distances/issues


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


Authors: Fredrik Savje [aut, cre]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports stats

Suggests testthat


Imported by StempCens, liayson.

Depended on by quickblock, quickmatch, scclust.


See at CRAN