Learn R Programming

smerc (version 1.8.3)

nn2zones: Convert nearest neighbors list to zones

Description

nn2zones converts a list of nearest neighbors to a list of zones. The list of nearest neighbors will come from functions such as nnpop or knn.

Usage

nn2zones(nn)

Value

A list of zones

Arguments

nn

A list of nearest neighbors

Examples

Run this code
data(nydf)
coords <- with(nydf, cbind(x, y))
nn <- knn(coords, k = 2)
nn2zones(nn)

Run the code above in your browser using DataLab