spatial.weights(neighbor, parameters=NULL, region.id=NULL)
Let a[i,j] denote a non-zero element of the k-th weight matrix. This implies that regions i and j are neighbors of the k-th kind, and the strength of this relationship is given by the magnitude of a[i,j].
spatial.weights can compute a weighted sum of the matrices A, where the weights in the linear combination are given by the elements in argument parameters. In practice, you might want to use routine spatial.weights when, for example, you want to compute the spatial covariance matrix for a spatial process.
row.id <- c(1,1,2,3) col.id <- c(2,3,3,4) neighbor <- spatial.neighbor(row.id=row.id, col.id=col.id, symmetric=T) spatial.weights(neighbor)