Description Usage Arguments Value Examples

`determineNeighbors`

returns an N x k matrix of the nearest neighbors
for spatial locations coords, with the ith row giving indices of the k nearest
neighbors to the ith location, which are selected from among the 1,...(i-1)
other spatial locations. The first row is -1's, since the first location has
no neighbors. The i=2 through i=(k+1) rows each necessarily contain 1:i.

1 | ```
determineNeighbors(coords, k)
``` |

`coords` |
N x 2 array of N 2-dimensional (x,y) spatial coordinates. |

`k` |
Scalar; number of neighbors |

An N x k matrix of nearest neighbor indices

1 2 | ```
coords <- cbind(runif(100), runif(100))
determineNeighbors(coords, 20)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.