nnangle: nearest neighbour angles and distances

View source: R/nnangle.R

nnangleR Documentation

nearest neighbour angles and distances

Description

nearest neighbour angles and distances

Usage

nnangle(x, from, to)

Arguments

x

Matrix of coordinates, n rows and d columns

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)

Examples

x <- matrix(runif(200), ncol = 2)
nn <- nnangle(x)
summary(nn)


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