find_mutual_nn
find_mutual_nn.Rd
Identify Mutual Nearest Neighbors Between Groups
Arguments
- distance
A numeric symmetric distance matrix.
- k
Integer. Number of neighbors to consider per group.
- dis_thresh
Optional numeric threshold. If set, only mutual neighbors with distance < threshold are returned.
Value
A data frame of mutual nearest neighbor pairs with columns:
- group1
Index of first group
- group2
Index of second group
- dist
Distance between groups