Description Usage Arguments Value Examples
View source: R/find-k-nearest.R
Finds the K nearest neighbours of a sample, given a matrix containing sample distances.
1 | find_K_nearest(n, K = 3, Dist)
|
n: |
sample for which the nearest neighbors are computed |
K: |
number of nearest neighbors to be considered |
Dist: |
matrix containing sample distances, initially computed by compute_all_distances |
a list with elements:
- pos: the positions (rows) of the N nearest neighbours.
- dst: the distances of the N nearest neighbours.
1 2 3 4 | Dist <- compute_all_distances(scdata.3lines.simulated6genes_subsampled)
#find the 5 nearest neghbours of the second sample
neibs <- find_K_nearest(n=2, K = 5, Dist = Dist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.