Learn R Programming

SUMMER (version 0.3.0)

getAmat: Extract adjacency matrix from the map

Description

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.

Examples

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

Run the code above in your browser using DataLab