nn2zones: Convert nearest neighbors list to zones

View source: R/nn2zones.R

nn2zonesR Documentation

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)

Arguments

nn

A list of nearest neighbors

Value

A list of zones

Examples

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

jpfrench81/smerc documentation built on Jan. 13, 2024, 4:30 a.m.