| Computation of the contiguity matrix W | R Documentation |
Computation of the contiguity matrix W.
contiguity(coords, k = 10)
coords |
A matrix with the coordinates of the locations. The first column is the latitude and the second is the longitude. |
k |
The number of nearest neighbours to consider for the contiguity matrix. |
The contiguity matrix W. A square matrix with row standardised values (the elements of each row sum to 1).
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
alfa.slx, cv.alfaslx, me.aslx
data(fadn)
W <- contiguity(fadn[, 1:2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.