Skip to contents

Extract adjacency matrix from the map

Usage

getAmat(geo, names)

Arguments

geo

SpatialPolygonsDataFrame of the map

names

character vector of region ids to be added to the neighbours list

Value

Spatial djacency matrix.

Author

Zehang Richard Li

Examples

if (FALSE) {
data(DemoMap) 
mat <- getAmat(geo = DemoMap$geo, names = DemoMap$geo$REGNAME)
mat
DemoMap$Amat
}