Learn R Programming

SUMMER (version 2.0.0)

getAmat: Extract adjacency matrix from the map

Description

Extract adjacency matrix from the map

Usage

getAmat(geo, names)

Value

Spatial djacency matrix.

Arguments

geo

SpatialPolygonsDataFrame of the map

names

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

Author

Zehang Richard Li

Examples

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

Run the code above in your browser using DataLab