sample_dist_to_knn: calculates vector of nearest of nearest neighbors

Description Usage Arguments Details Value Examples

Description

sample_dist_to_knn calculates kth-nearest-neighbor distances from a sample.

Usage

1
sample_dist_to_knn(sampleDat, k)

Arguments

sampleDat

vector containing sample datapoints.

k

integer specifying the order of the neighbor.

Details

These are the details of the function.

Value

a vector of distances, where the ith element contains the distance between the ith element of sampleDat and its kth neighbor.

Examples

1
2
sample_dist_to_knn(sampleDat = 1:4,k = 3)
sample_dist_to_knn(sampleDat = array(1:12,dim = c(3,4)),k = 1)

kcucchi/vdke documentation built on May 20, 2019, 8:28 a.m.