Description Usage Arguments Details Value
nnear(vect, target, n=1)
1 | nnear(vect, target, n = 1)
|
vect |
vector of numerical values |
target |
target value which you want the nearest values to |
n |
the n nearest values to return |
a simple utility for finding the nearest values in a vector to a specified target value. The values, their position in the vector and the distance between each and the target are returned as a list.
index
position of the nearest n values within the original vector
values
actual values of the nearest n values
distance
absolute distance between the returned values and the target
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.