spatialContingencyMatrix: Create a spatial contingency matrix from a list of...

Description Usage Arguments Details Examples

View source: R/spatialContMat.R

Description

Create a matrix of local contingency matrix of size NxN starting from a list.

Usage

1

Arguments

clist

list of length N in which each element is a vector of id's continguous units

Details

The input argument clist should be a list of lenght N. Each element of this list must be a numeric vector, including the indices of the units that are contiguous to the unit corresponding to the list element. Function spatialContingencyMatrix returns a matrix whose values are 1's (contiguous units) and 0's (non-contiguous units).

Examples

1
2
3
4
5
# List of contiguous units ---
cl <- list( c(2, 3), c(1,4), c(1,6), c(2,6), NULL, c(3,4))

# Generate spatial contingency matrix ---
cm <- spatialContingencyMatrix(cl)

rhobis/FPdust documentation built on May 29, 2021, 8:36 a.m.