knnangle: k-th nearest neighbour angles and distances

View source: R/knnangle.R

knnangleR Documentation

k-th nearest neighbour angles and distances

Description

k-th nearest neighbour angles and distances

Usage

knnangle(x, k = 1, from, to)

Arguments

x

Matrix of coordinates, n rows and d columns

k

k-th nearest neighbour

from

From these indices (default all 1,...,nrow(x))

to

To these indices (default all)

Details

If 2d, returns the angle in [-pi, pi]. In 3d also the angle from xy-plane in [0,pi]

Value

The values in 2d are (azimuth, distance) The values in 3d are physical coordinate system (azimuth, inclination, distance)


antiphon/Kdirectional documentation built on Feb. 13, 2023, 6:26 a.m.