Learn R Programming

⚠️There's a newer version (0.1.12) of this package.Take me there.

distances

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.

Copy Link

Version

Install

install.packages('distances')

Monthly Downloads

2,016

Version

0.1.6

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Fredrik Savje

Last Published

December 12th, 2018

Functions in distances (0.1.6)

nearest_neighbor_search

Nearest neighbor search
is.distances

Check distances object
max_distance_search

Max distance search
distance_columns

Distance matrix columns
distance_matrix

Distance matrix
distances-package

distances: Tools for Distance Metrics
distances

Constructor for distance metric objects