Description Usage Arguments Value Examples
View source: R/filter_distances.R
filter_distances
1 | filter_distances(point, data, threshold, metric = "euclidean")
|
point |
Vector, values defining a single observation to compute distances for |
data |
Dataframe, values of all observations to calculate distances from point |
threshold |
float, maximum distance of observations to return indices for |
metric |
Char, type of distance metric to use in distance calculations |
Vector, indices of the observations with distance less than 'threshold' from 'point'
1 2 | df <- data.frame(x=c(1, 1), y=c(1,2))
filter_distances(c(1,1), df, 0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.