Description Usage Arguments Details Value Examples
sample_dist_to_knn calculates kth-nearest-neighbor distances from a
sample.
1 | sample_dist_to_knn(sampleDat, k)
|
sampleDat |
vector containing sample datapoints. |
k |
integer specifying the order of the neighbor. |
These are the details of the function.
a vector of distances, where the ith element contains the
distance between the ith element of sampleDat and its
kth neighbor.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.