elliptic.nn | R Documentation |
elliptic.nn
computes the nearest neighbors
relationships for elliptic.test
. It will provide
a list of nearest neighbors, and a list of the associated
shape and angle.
elliptic.nn( coords, pop, ubpop = 0.5, shape = c(1, 1.5, 2, 3, 4, 5), nangle = c(1, 4, 6, 9, 12, 15) )
coords |
An n \times 2 matrix of centroid coordinates for the regions in the form (x, y) or (longitude, latitude) is using great circle distance. |
pop |
The population size associated with each region. |
ubpop |
The upperbound of the proportion of the total population to consider for a cluster. |
shape |
The ratios of the major and minor axes of the desired ellipses. |
nangle |
The number of angles (between 0 and 180) to consider for each shape. |
A list of nested nearest neighbors, the associated shapes and angles for each set of nn, and all of the shapes and angles you get for each zone constructed from the set of nearest neighbors.
data(nydf) coords <- with(nydf, cbind(longitude, latitude)) enn <- elliptic.nn(coords, nydf$pop, 0.1, shape = c(1, 1.5), nangle = c(1, 4) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.