k.nearest.angles: Get angle from each point to its k nearest neighbours

Description Usage Arguments Value Examples

View source: R/Angular-functions.R

Description

For each point in the set, uses knnx.index to obtain the k nearest neighbours, then applies atan2 to get the angle between them.

Usage

1

Arguments

pts

A two-column matrix containing the coordinates of the points to be compared.

k

Number of neighbours to be included for each point.

Value

A (k+2)-column matrix; the first two columns contain each point's x and y coordinates, the remainder containing the angles found

Examples

1
k.2 <- k.nearest.angles(p, 2)

ClairBee/AS.angles documentation built on May 6, 2019, 11:50 a.m.