pgirmess (version 2.0.3)

distNNeigh: Computes distances to the nearest neighbour

Description

Computes distances to the nearest neighbour

Usage

distNNeigh(db)

Value

A vector of distances

Arguments

db

A matrix or data.frame of points coordinates column 1 = x,column 2 = y.

Details

Computes distances to the nearest neighbour for each line of a matrix of points coordinates

See Also

knearneigh, knn2nb, nbdists

Examples

Run this code
distNNeigh(cbind(rnorm(30),rnorm(30)))

Run the code above in your browser using DataLab