A function to calculate a Euclidian distance including at least one neighbor for all individuals.
min_dist(smap, grouping = rep(1, nrow(smap)))
A matrix showing a spatial map. The first and second column include spatial points along a x-axis and y-axis, respectively.
A integer vector assigning each individual to a group. This argument can be useful when a "smap" contains different experimental replicates. Default setting means that all individuals are belong to a single group.
Return a scalar of the minimum Euclidian distance that allows all individuals to have at least one neighbor.