Learn R Programming

mathart (version 0.0.0.9000)

k_nearest_neighbour_graph: k-nearest neighbour graph

Description

Computes a k-nearest neighbour graph for a given set of points. Refer to the Wikipedia article for details.

Usage

k_nearest_neighbour_graph(points, k = 8)

Arguments

points

A data frame with x, y coordinates for the points

k

Number of neighbours

Examples

Run this code
# NOT RUN {
k_nearest_neighbour_graph()
# }

Run the code above in your browser using DataLab