pgirmess (version 1.6.9)

distNNeigh: Computes distances to the nearest neighbour

Description

Computes distances to the nearest neighbour

Usage

distNNeigh(db)

Arguments

db

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

Value

A vector of distances

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
# NOT RUN {
distNNeigh(cbind(rnorm(30),rnorm(30)))
# }

Run the code above in your browser using DataCamp Workspace