powered by
Find the k nearest neighbors for all individuals in a population. This function is simply a wrapper for FNN::knn.dist.
FNN::knn.dist
kNearNeighbors(scene, k)
a matrix where the rows are all individuals and the columns are their k nearest neighbors
a matingScene object
integer of how many nearest neighbors to get
knn.dist, proximity
knn.dist
proximity
pop <- simulateScene(10) kNearNeighbors(pop, 3)
Run the code above in your browser using DataLab