filter.by.2nn: Identify points whose two nearest neighbours are in line with...

Description Usage Arguments Value Examples

View source: R/Angular-functions.R

Description

For each point in the set, uses k.nearest.angles to obtain the 2 nearest neighbours, then identifies any for which the angle between them is more than pi/8 from perpendicular or parallel.

Usage

1

Arguments

pts

An n-by-2 matrix containing the coordinates of the points to be compared.

Value

A Boolean array of length n that can be used to filter points or angles. TRUE indicates that the angle between the two nearest neighbours is closer to perpendicular than not; FALSE indicates that the absolute difference, modulo 2pi, is closer to 45 degrees than to 0 or 90.

Examples

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

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