calculate k nearest neighbours from a distance matrix
knn_dist(dis, k)
dis
distance matrix
k
number of nearest neighbours (Note that with a tie, the function returns the alphanumerically first one!)