kNearNeighbors: Get k Nearest Neighbors

Description Usage Arguments Value See Also Examples

Description

Find the k nearest neighbors for all individuals in a population. This function is simply a wrapper for FNN::knn.dist.

Usage

1
kNearNeighbors(scene, k)

Arguments

scene

a matingScene object

k

integer of how many nearest neighbors to get

Value

a matrix where the rows are all individuals and the columns are their k nearest neighbors

See Also

knn.dist

Examples

1
2
pop <- simulateScene(10)
kNearNeighbors(pop, 3)

danhan52/mateable documentation built on May 14, 2019, 3:35 p.m.