nn2zones | R Documentation |
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
.
nn2zones(nn)
nn |
A list of nearest neighbors |
A list of zones
data(nydf)
coords <- with(nydf, cbind(x, y))
nn <- knn(coords, k = 2)
nn2zones(nn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.