View source: R/spatialDataFunctions.R
kNearNeighbors | R Documentation |
Find the k nearest neighbors for all individuals in a population. This
function is simply a wrapper for FNN::knn.dist
.
kNearNeighbors(scene, k)
scene |
a matingScene object |
k |
integer of how many nearest neighbors to get |
a matrix where the rows are all individuals and the columns are their k nearest neighbors
knn.dist
, proximity
pop <- simulateScene(10) kNearNeighbors(pop, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.