Learn R Programming

kkmeans (version 0.1.3)

get_mknn_dist: Get the average distance to each points k-nearest neighbor

Description

Given a dataset and a value k, will return the value of the average distance from each point to it's k-nearest neighbor

Usage

get_mknn_dist(data, k = FALSE)

Value

The average distance from each point to it's k-th nearest neighbor.

Arguments

data

the data vector

k

which neighbor to average over