k-Nearest Neighbors the k.nearest.neigbors gives the list of points (k-Neigbours) that are closest to the row i in descending order.
k.nearest.neigbors
Useful links